Method and apparatus for direct communication key establishment

ABSTRACT

A method, performed by a User Equipment device, UE, for obtaining a key for direct communication with a device over an air interface, wherein the UE has previously acquired a transaction identifier received from a Bootstrapping Server Function, BSF, in a Generic Bootstrapping Architecture, GBA, procedure, is provided. The method comprises storing the transaction identifier, sending the transaction identifier to the device and requesting key generation for direct communication with the device. If the transaction identifier is invalid, the method further comprises receiving from the device a device identifier and key generation information, deriving a session shared key from at least the key generation information, and deriving a direct communication key from at least the session shared key and the device identifier.

PRIORITY

This application is a continuation, under 35 U.S.C. § 120, of U.S.application Ser. No. 14/892461 filed Nov. 19, 2015, which is a nationalstage filing under 35 U.S.C. § 371 of International Patent ApplicationSerial No. PCT/EP2015/068861, filed Aug. 17, 2015, and entitled “MethodAnd Apparatus For Direct Communication Key Establishment.”

TECHNICAL FIELD

The present invention relates to methods for establishing a key fordirect communication between a User Equipment device, UE, and a device.The present invention also relates to a UE, a device and a DirectCommunication Element, and to a computer program configured to carry outmethods for establishing a key for direct communication between a UE anda device.

BACKGROUND

Direct communication involves establishing a radio connection betweentwo devices without transiting via an access network of a cellularcommunication network. Direct communication may be used to establishcommunication between two User Equipment Devices (UEs) which may or maynot be out of network coverage, or may enable one device to act as arelay for another device, providing access to network services to adevice which is out of network coverage. In the 3^(rd) GenerationPartnership Project (3GPP), direct communication is enabled viaProximity Services (ProSe), as set out in TS 33.303 and other standarddocuments. The following discussion focuses on 3GPP ProSe but is equallyapplicable to other direct communication technologies.

ProSe consists of two main elements: ProSe Direct Discovery, involvingthe network assisted discovery of users with a desire to communicate whoare in close physical proximity, and ProSe Direct Communication, inwhich direct communication between such users is facilitated with orwithout supervision from the network. The ProSe direct communicationpath may use Evolved UMTS Terrestrial Radio Access (E-UTRA) or WirelessLocal Area Network direct (WLAN direct) radio technology.

FIG. 1 illustrates a reference ProSe architecture, according to whichtwo ProSe-enabled UEs 2 may establish a direct communication pathbetween them. Communication between the devices takes place over the PC5interface, with each device able to communicate with a ProSe Function 4in the cellular network over the PC3 interface, and with a ProSeapplication server 6 over a PC1 interface. ProSe direct communicationmay also involve a ProSe “UE-to-Network Relay”, according to which adevice, which may itself be a UE, may act as a relay between the E-UTRANand a UE which is out of the coverage area of the E-UTRAN. Thisarrangement is illustrated in FIG. 2, with remote UE 2 obtaining accessto the E-UTRAN via ProSe direct communication with a ProSe UE-to-NetworkRelay 8. ProSe direct communication is particularly advantageous forpublic safety communication, providing communication services for theemergency services and other public safety bodies. The example of FIG. 2illustrates the ProSe enabled remote UE 2 communicating with a PublicSafety Application Server 10 via the E-UTRAN and EPC, which the remoteUE 2 can access via ProSe direct communication with the ProSeUE-to-Network Relay 8.

In order to secure communication between two devices using ProSe DirectCommunication, a shared key may be used when communicating over the PC5interface. Standard procedure is to pre-configure appropriate sharedkeys into ProSe enabled devices. However, pre-configuring appropriateshared keys to enable ProSe Direct Communication with every other devicethat an enabled device may wish to communicate with may be extremelychallenging. A single ProSe enabled UE may wish to communicate with arange of different ProSe enabled UEs, and with many differentUE-to-Network Relays serving different cells within the network. Inaddition, two ProSe enabled UEs, or a UE and UE-to-Network Relay,wishing to communicate may be served by different Home PLMNs, or one orboth devices may roam into a new PLMN, further complicating the task ofpre-configuring shared keys. Pre-configuring shared keys in all of therelevant ProSe enabled devices to enable all of the possiblecommunication paths that may be desired is therefore an extremelycomplex process.

SUMMARY

According to an aspect of the present invention, there is provided amethod, performed by a User Equipment device, UE, for obtaining a keyfor direct communication with a device over an air interface, whereinthe UE has previously acquired a transaction identifier received from aBootstrapping Server Function, BSF, in a Generic BootstrappingArchitecture, GBA, procedure, the method comprising, storing thetransaction identifier, sending the transaction identifier to the deviceand requesting key generation for direct communication with the device,if the transaction identifier is invalid, the method further comprises,receiving from the device a device identifier and generationinformation, and deriving a direct communication key from at least thesession shared key and the device identifier.

In some examples, the method may be conducted with the UE out ofcoverage of coverage of a communication network, such as an E-UTRAN.

According to examples of the invention, the direct communication key maybe derived using additional inputs to the session shared key and thedevice identifier, including for example the UE identifier or othersuitable identifiers. In some examples, the direct communication key maybe derived using a Key Derivation Function (KDF), and the inputparameters may be hashed or otherwise processed before they are used toderive the direct communication key. The KDF can be any standardfunction such as the KDF defined in 3GPP TS 33.220.

According to examples of the invention, the device may be a UE, aUE-to-network Relay, or may be a network node. According to examples ofthe invention, the interface may comprise a Proximity Services, ProSe,interface. The ProSe interface may comprise a PC5 interface.

According to examples of the invention, the invalid transactionidentifier may be used as an identifier of the UE.

According to examples of the invention, the method may further comprisediscovering the device through a discovery procedure.

In one embodiment, at least one of transaction identifier, the deviceidentifier or the request for key generation is comprised within adiscovery procedure message.

In another embodiment, the UE further sends a direct communicationelement identifier, direct key set identifier, DKSI, a list of securityalgorithms supported by the UE, and a nonce generated by the UE, to thedevice.

In one embodiment, the method may comprise receiving a MessageAuthentication Code, MAC, with the device identifier and key generationinformation, wherein the MAC is generated using the direct communicationkey or a key derived from the direct communication key.

According to some examples, the method may further comprise receivingthe DKSI, lifetime, at least one security algorithm chosen by the devicefrom the list of security algorithms, said list of security algorithmssupported by the UE and a nonce generated by the device together withthe MAC, device identifier and key generation information.

In one embodiment, the method may further comprising sending aconfirmation message to the device indicating that the UE has derivedthe direct communication key.

In some examples, the method further comprises checking the MAC with thederived direct communication key or a key derived from the directcommunication key, generating a confirmation MAC using the directcommunication key or a key derived from the direct communication key,and sending the confirmation MAC with the confirmation message; wherein,if the check is successful, the confirmation message further indicatesthat the UE has successfully checked the MAC.

In one embodiment, the UE cannot initiate another GBA bootstrappingprocedure.

In another embodiment, the UE does not comprise a valid shared secretwith a Bootstrapping Server Function, BSF.

According to another aspect of the invention, there is provided amethod, performed by a device, for obtaining a key for directcommunication with a User Equipment device, UE, over an air interface,the method comprising, receiving from the UE an invalid transactionidentifier and a request to obtain a direct communication key, sendingto a Direct Communication Element the transaction identifier and adevice identifier, and requesting the Direct Communication Element toprovide the device with the direct communication key, receiving thedirect communication key and key generation information from the DirectCommunication Element, and sending the key generation information andthe device identifier to the UE.

In one embodiment, the invalid transaction identifier is used as anidentifier of the UE.

In another embodiment, the interface comprises a Proximity Services,ProSe, interface, and the Direct Communication Element comprises atleast one of ProSe Function, a ProSe Key Management Function or a ProSeKey Management Server.

In one example, the method further comprises discovering the UE througha discovery procedure.

In another example, at least one of the transaction identifier, deviceidentifier or the request for key generation is comprised within adiscovery procedure message.

In one embodiment, the device further receives from the UE a directcommunication element identifier, a direct key set identifier, DKSI, alist of security algorithms supported by the UE and a nonce generated bythe UE.

In yet another embodiment, the device further sends to the UE the DKSI,a lifetime, at least one security algorithm chosen from the list ofsecurity algorithms supported by the UE, said list of securityalgorithms supported by the UE and a nonce generated by the device.

In one example, the method further comprises generating a MessageAuthentication Code, MAC, using the direct communication key or a keyderived from the direct communication key, and sending the MAC to the UEwith the key generation information and the device identifier.

In another example, the method further comprises receiving aconfirmation message from the UE indicating that the UE has derived thedirect communication key.

In one embodiment, the confirmation message further indicates that theUE has successfully checked the MAC.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, the Direct Communication Element may comprise afirst sub-Element in the first communication network and a secondsub-Element in the second communication network. In some examples, thefirst sub-Element may be a ProSe Function or ProSe KMS in a home PLMN ofthe UE and the second sub-Element may be a ProSe Function or ProSe KMSin a home PLMN of the device. A UE or device which is comprised within acommunication network may for example comprise a UE or device whichsubscribes to the communication network.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from the DirectCommunication Element may comprise sending to and receiving from thesecond sub-Element comprised within the second communication network.

According to a further aspect of the invention, there is provided amethod, performed by a Direct Communication Element, for establishing akey for direct communication over an interface between a User Equipmentdevice, UE, and a device, the method comprising, receiving from thedevice a transaction identifier, a device identifier, and a request toprovide a direct communication key to the device, determining if thetransaction identifier is invalid, if the transaction identifier isinvalid, the method further comprises using the transaction identifierto identify the UE, sending a request to a bootstrapping serverfunction, BSF, for key generation information and a session shared keyfrom, and receiving said key generation information and session sharedkey from the BSF, deriving a direct communication key from at least thesession shared key and the device identifier sending the directcommunication key and the key generation information to the device.

In some examples, a BSF that is associated with a UE may be a BSF thatis contained within the same communication network as the UE, forexample the same PLMN.

According to examples of the invention, the device may be a UE, aUE-to-network Relay, or may be a network node.

According to examples of the invention, the direct communication key maybe derived using additional inputs to the session shared key and thedevice identifier, including for example, the UE identifier or othersuitable identifiers. In some examples, the direct communication key maybe derived using a Key Derivation Function (KDF), and the inputparameters may be hashed or otherwise processed before they are used toderive the direct communication key. The KDF may be any standardfunction such as the KDF defined in 3GPP TS 33.220.

In one embodiment, using the transaction identifier to identify the UEcomprises the direct communication element matching the transactionidentifier with a stored transaction identifier from a previous GenericBootstrapping Architecture procedure.

In another embodiment, the method further comprises mapping the matchedtransaction identifier to a public UE identifier and sending the publicUE identifier to the BSF.

If the direct communication element cannot match the transactionidentifier with a stored transaction identifier, the method may furthercomprise sending the transaction identifier to the BSF and receiving thesession shared key and the key generation information from the BSF.

In one embodiment, the interface comprises a Proximity Services, ProSe,interface, and the Direct Communication Element comprises at least oneof a ProSe Function, a ProSe Key Management Function or a ProSe KeyManagement Server.

In another embodiment, the method further comprises checking that atleast one of the device or the UE is authorised to establish directcommunication.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, the Direct Communication Element may comprise afirst sub-Element in the first communication network and a secondsub-Element in the second communication network. In some examples, thefirst sub-Element may be a ProSe Function or ProSe KMS in a home PLMN ofthe UE and the second sub-Element may be a ProSe Function or ProSe KMSin a home PLMN of the device.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, checking that at least one of the device or theUE is authorised to establish direct communication may comprise checkingthat the UE is authorised to establish direct communication in the firstsub-Element, and checking that the device is authorised to establishdirect communication in the second sub-Element.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from at least one of theBSF or the device may comprise sending to and receiving from one of thefirst or second sub-Elements via the other of the first or secondsub-Elements. In some examples, in which the sub-Elements comprise ProSeFunctions in different PLMNs, the communication between sub-Elements maybe over a PC6 interface.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from the BSF maycomprise sending and receiving at the first sub-Element, and derivingthe direct communication key may comprise deriving the directcommunication key at the second sub-Element.

In any of the methods described above, the device may comprise at leastone of a UE or a UE-to-Network Relay. The Direct Communication Elementmay be a functional element hosted on a server or other processingelement. The key generation information may comprise GenericBootstrapping Architecture Push Information, GPI. Furthermore, thetransaction identifier may be a bootstrapping transaction identifier(B-TID).

In yet another aspect of the invention, there is provided a system forsecuring direct communication between a User Equipment device, UE, and adevice over an interface, the system comprising a UE, a device and aDirect Communication Element; wherein the UE comprises means for sendingan invalid transaction identifier to the direct communication elementvia the device, and the direct communication element comprises means forusing the invalid transaction identifier to identify the UE, the directcommunication element further comprises means for obtaining a sessionshared key and Generic Bootstrapping Architecture Push Information, GPI,deriving a direct communication key from at least the session sharedkey, and sending the direct communication key and the GPI to the device,wherein the device comprises means for sending the GPI to the UE, andwherein the UE comprises means for deriving the session shared key fromat least the GPI and to derive the direct communication key from thesession shared key.

In one embodiment, the Direct Communication Element and the UE comprisemeans for deriving the direct communication key from the session sharedkey and a device identifier.

According to one aspect to the invention, there is provided a UserEquipment device, UE, for obtaining a key for direct communication witha device over an air interface, wherein the UE has previously acquired atransaction identifier received from a Bootstrapping Server Function,BSF, in a Generic Bootstrapping Architecture, GBA, procedure, the UEcomprising storing means for storing the transaction identifier,communication means for sending the transaction identifier to the deviceand requesting key generation for direct communication with the device,if the transaction identifier is invalid, the communication meansfurther comprises means for receiving from the device a deviceidentifier and key generation information, key means for deriving asession shared key from at least the key generation information, and forderiving a direct communication key from at least the session shared keyand the device identifier.

According to another aspect of the invention, there is provided adevice, for obtaining a key for direct communication with a UserEquipment device, UE, over an air interface, the device comprisingcommunication means for receiving from the UE an invalid transactionidentifier and a request to obtain a direct communication key, sendingto a Direct Communication Element the transaction identifier and adevice identifier, and requesting the Direct Communication Element toprovide the device with the direct communication key; and receiving thedirect communication key and key generation information from the DirectCommunication Element; and sending the key generation information andthe device identifier to the UE.

According to yet another aspect of the invention, there is provided aDirect Communication Element, for establishing a key for directcommunication over an interface between a User Equipment device, UE, anda device, the Direct Communication Element comprising communicationmeans for receiving from the device a transaction identifier, a deviceidentifier, and a request to provide a direct communication key to thedevice, authorizing means for determining if the transaction identifieris invalid, if the transaction identifier is invalid, the authorizingmeans further comprises means for using the transaction identifier toidentify the UE, the communication means further comprising means forsending a request to a bootstrapping server function, BSF, for keygeneration information and a session shared key from, and receiving saidkey generation information and session shared key from the BSF, keymeans for deriving a direct communication key from at least the sessionshared key and the device identifier the communication means furthercomprising means for sending the direct communication key and the keygeneration information to the device.

According to an aspect of the invention, there is provided a Userequipment device, UE, for obtaining a key for direct communication witha device over an interface, the UE comprising a processor and a memory,said memory containing instructions that when executed cause the UE tostore a transaction identifier obtained from a Generic BootstrappingArchitecture, GBA, procedure, send the transaction identifier to thedevice and requesting key generation for direct communication with thedevice, if the transaction identifier is invalid, the memory containsfurther instructions that when executed cause the EU to, receive fromthe device a device identifier and key generation information, derive asession shared key from at least the key generation information, andderive a direct communication key from at least the session shared keyand the device identifier.

In one embodiment, the memory further contains instructions that whenexecuted cause the UE to carry out the method as claimed in any ofappended claims 2 to 12

According to another aspect of the invention, there is provided a deviceconfigured for obtaining a key for direct communication with a UserEquipment, UE, over an interface, the device comprising a processor anda memory, said memory containing instructions that when executed causethe device to receive from the UE an invalid transaction identifier andrequest to obtain a direct communication key, send to a directcommunication element the transaction identifier and a deviceidentifier, and request the direct communication element to provide thedevice with the device communication key, receive the directcommunication key and key generation information from the directcommunication element; and send the key generation information and thedevice identifier to the UE.

In one embodiment, the memory further contains instructions that whenexecuted causes the device to carry out the method as claimed in any ofappended claims 13 to 22.

According to yet another aspect of the invention, there is provided aDirect Communication Element configured for establishing a key fordirect communication over an interface between a User Equipment device,UE and a device, the Direct communication element comprising a processorand a memory, said memory containing instructions that when executedcause the Direct Communication Element to receive from the device atransaction identifier, a device identifier, and a request to provide adirect communication key to the device, determine if the transactionidentifier is invalid, if the transaction identifier is invalid, thememory further contains instructions that when executed causes theDirect Communication element to use the transaction identifier toidentify the UE, send a request to a bootstrapping server function, BSF,for key generation information and a session shared key from, andreceive said key generation information and session shared key from theBSF, derive a direct communication key from at least the session sharedkey and the device identifier send the direct communication key and thekey generation information to the device.

In one embodiment, the memory further contains instructions that whenexecuted causes the device to carry out the method as claimed in any ofappended claims 24 to 28.

According to another aspect of the invention, there is provided amethod, performed by a User Equipment device, UE, for obtaining a keyfor direct communication with a device over an air interface, the methodcomprising sending to the device a UE identifier comprising any of ProSeUE ID, international mobile subscriber identity, IMSI, mobile stationinternational subscriber directory number, MSISDN, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codeand requesting key generation for direct communication with the device,receiving from the device a device identifier and key generationinformation, deriving a session shared key from at least the keygeneration information, and deriving a direct communication key from atleast the session key and the device identifier.

In some examples, the method may be conducted with the UE out ofcoverage of coverage of a communication network, such as an E-UTRAN.

According to examples of the invention, the direct communication key maybe derived using additional inputs to the session shared key and thedevice identifier, including for example the UE identifier or othersuitable identifiers. In some examples, the direct communication key maybe derived using a Key Derivation Function (KDF), and the inputparameters may be hashed or otherwise processed before they are used toderive the direct communication key. The KDF can be any standardfunction such as the KDF defined in 3GPP TS 33.220.

According to examples of the invention, the device may be a UE, aUE-to-network Relay, or may be a network node. According to examples ofthe invention, the interface may comprise a Proximity Services, ProSe,interface. The ProSe interface may comprise a PC5 interface.

The method may comprise discovering the device through a discoveryprocedure.

In some examples, at least one of the UE identifier, the deviceidentifier or the request for key generation is comprised within adiscovery procedure message.

In one embodiment, the UE further sends to the device, a directcommunication element identifier, direct key set identifier, DKSI, alist of security algorithms supported by the UE, and a nonce generatedby the UE.

In another embodiment, the method comprises receiving a MessageAuthentication Code, MAC, with the device identifier and key generationinformation, wherein the MAC is generated using the direct communicationkey or a key derived from the direct communication key.

In yet another embodiment, the method comprises receiving the DKSI, alifetime, at least one security algorithm chosen by the device from thelist of security algorithms, said list of security algorithms supportedby the UE, together with the MAC, device identifier and key generationinformation.

In one example, the method comprises sending a confirmation message tothe device indicating that the UE has derived the direct communicationkey.

In another example, the method comprises checking the MAC with thederived direct communication key or a key derived from the directcommunication key, generating a confirmation MAC using the directcommunication key or a key derived from the direct communication key,sending the confirmation MAC with the confirmation message; wherein, ifthe check is successful, the confirmation message further indicates thatthe UE has successfully checked the MAC.

In one embodiment, the method comprises, as a preceding step, requestingkey generation for direct communication with the device, and in responsereceiving from the device a Generic Bootstrapping Architecture, GBA,renegotiation request.

The UE may not be able to initiate a Generic bootstrapping architecture,GBA, procedure. The UE may not comprise a valid shared secret with aBootstrapping Server Function, BSF.

The method may comprise, as a preceding step, sending a temporary key tothe device and receiving in response a request for a new temporary key,and then sending the UE identifier instead of a new temporary key.

In another embodiment, the method comprises, as a preceding step,receiving the ProSe UE ID, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code from the DirectCommunication element.

According to another aspect of the invention, there is provided amethod, performed by a device, for obtaining a key for directcommunication with a User Equipment device, UE, over an air interface,the method comprising, receiving from the UE a UE identifier comprisingany of ProSe UE ID, international mobile subscriber identity, IMSI,mobile station international subscriber directory number, MSISDN, ProSeRelay UE ID, ProSe Discovery UE ID, ProSe Application code or ProSeRestricted code and a request to obtain a direct communication key,sending to a Direct Communication Element the UE identifier and a deviceidentifier of the device, and requesting the Direct CommunicationElement to provide the device with the direct communication key; andreceiving the direct communication key and key generation informationfrom the Direct Communication Element, and sending the key generationinformation and the device identifier to the UE.

According to examples of the invention, the device may be a UE, aUE-to-network Relay, or may be a network node.

According to examples of the invention, the Direct Communication Elementmay be a functional element hosted on a server or other processingelement.

In one embodiment, the interface comprises a Proximity Services, ProSe,interface, and the Direct Communication Element comprises at least oneof ProSe Function, ProSe Key Management Server, a ProSe Key ManagementFunction.

In one embodiment, the method further comprises discovering the UEthrough a discovery procedure.

In one example, at least one of the UE identifier, device identifier andthe request for key generation are comprised within a discoveryprocedure message.

In one example, the method further comprises receiving a directcommunication element identifier, a direct key set identifier, a list ofsecurity algorithms supported by the UE and a nonce generated by the UE.

In one embodiment, the method comprises sending to the UE the DKSI, alifetime, at least one security algorithm chosen by the device from thelist of security algorithms supported by the UE, said list of algorithmssupported by the UE, and a nonce generated by the device.

In another embodiment, the method further comprises generating a MessageAuthentication Code, MAC, using the direct communication key or a keyderived from the direct communication key and sending the MAC to the UEwith the key generation information and the device identifier.

In one embodiment, the method comprises receiving a confirmation messagefrom the UE indicating that the UE has derived the direct communicationkey.

In one example, the confirmation message further indicates that the UEhas successfully checked the MAC.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, the Direct Communication Element may comprise afirst sub-Element in the first communication network and a secondsub-Element in the second communication network. In some examples, thefirst sub-Element may be a ProSe Function or ProSe KMS in a home PLMN ofthe UE and the second sub-Element may be a ProSe Function or ProSe KMSin a home PLMN of the device. A UE or device which is comprised within acommunication network may for example comprise a UE or device whichsubscribes to the communication network.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from the DirectCommunication Element may comprise sending to and receiving from thesecond sub-Element comprised within the second communication network.

According to another aspect of the invention, there is provided amethod, performed by a Direct Communication Element, for establishing akey for direct communication over an interface between a User Equipmentdevice, UE, and a device, the method comprising receiving from thedevice a UE identifier comprising any of ProSe UE ID, internationalmobile subscriber identity, IMSI, mobile station internationalsubscriber directory number, MSISDN, ProSe Relay UE ID, ProSe DiscoveryUE ID, ProSe Application code or ProSe Restricted code, a deviceidentifier, and a request to provide a direct communication key to thedevice, identifying the UE from the UE identifier, sending a request toa bootstrapping server function, BSF, for key generation information anda session shared key, and receiving from the BSF said key generationinformation and session shared key, deriving the direct communicationkey from at least the session shared key and the device identifier,sending the direct communication key and the key generation informationto the device.

In some examples, a BSF that is associated with a UE may be a BSF thatis contained within the same communication network as the UE, forexample the same PLMN.

According to examples of the invention, the device may be a UE, aUE-to-network Relay, or may be a network node.

According to examples of the invention, the direct communication key maybe derived using additional inputs to the session shared key and thedevice identifier, including for example, the UE identifier or othersuitable identifiers. In some examples, the direct communication key maybe derived using a Key Derivation Function (KDF), and the inputparameters may be hashed or otherwise processed before they are used toderive the direct communication key. The KDF may be any standardfunction such as the KDF defined in 3GPP TS 33.220.

According to examples of the invention, the Direct Communication Elementmay be functional element hosted on a server or other processingelement.

In one embodiment, the method further comprises mapping the identifiedUE to a public UE identifier and sending the public UE identifier to theBSF.

In one embodiment, the interface comprises a Proximity Services, ProSe,interface, and the Direct Communication Element comprises at least oneof a ProSe Function, a ProSe Key Management Function or a ProSe KeyManagement Server.

In another embodiment, the method further comprises checking that atleast one of the device or the UE is authorised to establish directcommunication.

In one example, the method further comprises, as a preceding step,generating a ProSe UE ID, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code and providing it to theUE.

In any of the methods described above, the device may comprise at leastone of a UE or a UE-to-Network Relay. The key generation information maycomprise Generic Bootstrapping Architecture Push Information, GPI.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, the Direct Communication Element may comprise afirst sub-Element in the first communication network and a secondsub-Element in the second communication network. In some examples, thefirst sub-Element may be a ProSe Function or ProSe KMS in a home PLMN ofthe UE and the second sub-Element may be a ProSe Function or ProSe KMSin a home PLMN of the device.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, checking that at least one of the device or theUE is authorised to establish direct communication may comprise checkingthat the UE is authorised to establish direct communication in the firstsub-Element, and checking that the device is authorised to establishdirect communication in the second sub-Element.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from at least one of theBSF or the device may comprise sending to and receiving from one of thefirst or second sub-Elements via the other of the first or secondsub-Elements. In some examples, in which the sub-Elements comprise ProSeFunctions in different PLMNs, the communication between sub-Elements maybe over a PC6 interface.

According to examples of the invention, if the UE is comprised within afirst communication network and the device is comprised within a secondcommunication network, sending to and receiving from the BSF maycomprise sending and receiving at the first sub-Element, and derivingthe direct communication key may comprise deriving the directcommunication key at the second sub-Element.

According to an aspect of the invention, there is provided a system forsecuring direct communication between a User Equipment device, UE, and adevice over an interface, the system comprising a UE, a device and aDirect Communication Element; wherein the UE comprises means for sendinga UE identifier comprising any of ProSe UE ID, international mobilesubscriber identity, IMSI, mobile station international subscriberdirectory number, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code, to the directcommunication element via the device, and the direct communicationelement comprises means for identifying the UE using the UE identifier,obtaining a session shared key and Generic Bootstrapping ArchitecturePush Information, GPI, deriving a direct communication key from at leastthe session shared key, and sending the direct communication key and theGPI to the device, wherein the device comprises means for sending theGPI to the UE, and wherein the UE comprises means for deriving thesession shared key from at least the GPI and to derive the directcommunication key from the session shared key.

In one embodiment, the Direct Communication Element and the UE areconfigured to derive the direct communication key from the sessionshared key and a device identifier.

According to one aspect of the invention, there is provided a UserEquipment device, UE, for obtaining a key for direct communication witha device over an air interface, the UE comprising communication meansfor sending to the device a UE identifier comprising any of ProSe UE ID,international mobile subscriber identity, IMSI, mobile stationinternational subscriber directory number, MSISDN, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codeand requesting key generation for direct communication with the device,the communication means further comprising means for receiving from thedevice a device identifier and key generation information, key means forderiving a session shared key from at least the key generationinformation, and deriving a direct communication key from at least thesession key and the device identifier.

According to another aspect of the invention, there is provided, adevice, for obtaining a key for direct communication with a UserEquipment device, UE, over an air interface, the device comprisingcommunication means for receiving from the UE a UE identifier comprisingany of ProSe UE ID, international mobile subscriber identity, IMSI,mobile station international subscriber directory number, MSISDN, ProSeRelay UE ID, ProSe Discovery UE ID, ProSe Application code or ProSeRestricted code and a request to obtain a direct communication key,sending to a Direct Communication Element the UE identifier and a deviceidentifier of the device, and requesting the Direct CommunicationElement to provide the device with the direct communication key, andreceiving the direct communication key and key generation informationfrom the Direct Communication Element, and sending the key generationinformation and the device identifier to the UE.

According to yet another aspect of the invention, there is provided aDirect Communication Element, for establishing a key for directcommunication over an interface between a User Equipment device, UE, anda device, the Direct Communication Element comprising communicationmeans for receiving from the device a UE identifier comprising any ofProSe UE ID, international mobile subscriber identity, IMSI, mobilestation international subscriber directory number, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode, a device identifier, and a request to provide a directcommunication key to the device, authorizing means for identifying theUE from the UE identifier, the communication means further comprisingmeans for sending a request to a bootstrapping server function, BSF, forkey generation information and a session shared key, and receiving fromthe BSF said key generation information and session shared key, keymeans for deriving the direct communication key from at least thesession shared key and the device identifier, and sending the directcommunication key and the key generation information to the device.

According to another aspect of the invention, there is provided a UserEquipment device, UE, for obtaining a key for direct communication witha device over an interface, the UE comprising a processor and a memory,said memory containing instructions that when executed cause the UE tocarry out a method to send to the device a UE identifier comprising anyof ProSe UE ID, international mobile subscriber identity, IMSI, mobilestation international subscriber directory number, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode and request key generation for direct communication with thedevice, receive from the device a device identifier and key generationinformation, derive a session shared key from at least the keygeneration information, and derive a direct communication key from atleast the session key and the device identifier.

In one embodiment, the memory further contains instructions that whenexecuted cause the UE to carry out the method as claimed in any ofappended claims 35 to 47.

According to a further aspect of the invention, there is provided adevice configured for obtaining a key for direct communication with aUser Equipment, UE, over an interface, the device comprising a processorand a memory, said memory containing instructions that when executedcause the device to receive from the UE a UE identifier comprising anyof ProSe UE ID, international mobile subscriber identity, IMSI, mobilestation international subscriber directory number, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode and a request to obtain a direct communication key, send to aDirect Communication Element the UE identifier and a device identifierof the device, and request the Direct Communication Element to providethe device with the direct communication key, and receive the directcommunication key and key generation information from the DirectCommunication Element, and send the key generation information and thedevice identifier to the UE.

In one embodiment, the memory further contains instructions that whenexecuted causes the device to carry out the method as claimed in any ofappended claims 49 to 56.

According to yet another aspect of the invention, there is provided aDirect Communication Element configured for establishing a key fordirect communication over an interface between a User Equipment device,UE and a device, the Direct communication element comprising a processorand a memory, said memory containing instructions that when executedcause the direct communication element to receive from the device a UEidentifier comprising any of ProSe UE ID, international mobilesubscriber identity, IMSI, mobile station international subscriberdirectory number, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code, a device identifier,and a request to provide a direct communication key to the device,identify the UE from the UE identifier, send a request to abootstrapping server function, BSF, for key generation information and asession shared key, and receive from the BSF said key generationinformation and session shared key, derive the direct communication keyfrom at least the session shared key and the device identifier, send thedirect communication key and the key generation information to thedevice.

In one embodiment, the memory further contains instructions that whenexecuted causes the device to carry out the method as claimed in any ofappended claims 58 to 61.

According to another aspect of the invention, there is provided acomputer program which, when run on a computer, causes the computer tocarry out a method according to any one of the appended claims 1 to 31and 34 to 63.

According to yet another aspect of the invention, there is provided acomputer program product comprising readable storage medium and acomputer program according to the preceding aspect of the presentinvention stored on the computer readable storage.

BRIEF DESCRIPTION OF THE DRAWINGS

For a better understanding of the present invention, and to show moreclearly how it may be carried into effect, reference will now be made,by way of example, to the following drawings in which:

FIG. 1 is a schematic representation of a Proximity Services (ProSe)architecture;

FIG. 2 is a representation of ProSe including a UE-to-Network Relay;

FIG. 3 is a schematic representation of a Generic BootstrappingArchitecture (GBA);

FIG. 4 is a schematic representation of a Generic BootstrappingArchitecture Push GBA Push;

FIG. 5a is a flow chart illustrating process steps in a method performedby a UE for obtaining a key for direct communication with a device overan interface;

FIG. 5b is a flow chart illustrating process steps in a method performedby a device for obtaining a key for direct communication with a UE overan interface;

FIG. 6 is a flow chart illustrating process steps in a method performedby a Direct Communication Element for establishing a key for directcommunication over an interface between a UE and a device;

FIG. 7 is a schematic representation of a system for securing directcommunication between a User Equipment device, UE, and a device over aninterface;

FIG. 8 is a representation of an example architecture for conducting themethods of FIGS. 5a to 6 and 14 to 16;

FIG. 9 is a representation of an example architecture for conducting themethods of FIGS. 5a to 6 and 14 to 16 over ProSe;

FIG. 10 is a message flow illustrating an example implementation of themethods of FIGS. 5a to 6 and 14 to 16 over ProSe;

FIG. 11 is a representation of another example architecture forconducting the methods of FIGS. 5a to 6 and 14 to 16 over ProSe, whereinthe UE and the device are comprised within different communicationnetworks;

FIG. 12 is a representation of another example architecture forconducting the methods of FIGS. 5a to 6 and 14 to 16, wherein the UE andthe device are comprised within different communication networks;

FIG. 13 is a message flow illustrating an example implementation of themethods of FIGS. 5a to 6 and 14 to 16 over ProSe;

FIG. 14 is a flow chart illustrating process steps in a method performedby a UE for obtaining a key for direct communication with a device overan interface;

FIG. 15 is a flow chart illustrating process steps in a method performedby a device for obtaining a key for direct communication with a UE overan interface;

FIG. 16 is a flow chart illustrating process steps in a method performedby a Direct Communication Element for establishing a key for directcommunication over an interface between a UE and a device;

FIG. 17 is a message flow illustrating an example of implementation ofthe methods of FIGS. 14 to 16.

FIG. 18 is a block diagram illustrating a UE;

FIG. 19 is a block diagram illustrating a device;

FIG. 20 is a block diagram illustrating a direct communication element;

FIG. 21 is a block diagram illustrating another example of a UE;

FIG. 22 is a block diagram illustrating another example of a device;

FIG. 23 is a block diagram illustrating another example of a directcommunication element;

FIG. 24 is a block diagram illustrating another example of a UE;

FIG. 25 is a block diagram illustrating another example of a device; and

FIG. 26 is a block diagram illustrating another example of a directcommunication element.

DETAILED DESCRIPTION

To avoid having to pre-configuring shared keys in all of the relevantProSe enabled devices to enable all of the possible communication pathsthat may be desired as discussed in the introduction, it has beensuggested in application number PCT/EP2015/050864 to use GenericBootstrapping Architecture (GBA) procedures to establish a shared key.However, such procedures require the ProSe enabled UE to be withinE-UTRAN coverage at least to perform initial bootstrapping procedures,after which the UE may move outside of network coverage. If the ProSeenabled UE is not within E-UTRAN coverage, or is unable to performbootstrapping procedures while in E-UTRAN coverage, then pre-configuringshared keys, with the associated challenges discussed above, remains theonly option.

Thus, it is an aim of the present invention to provide methods,apparatus and computer readable media which at least partially addressone or more of the challenges discussed above. Thus, embodiments of thepresent invention enable the establishment of a Direct Communication Keyfor securing communication between a UE and a device, which may itselfbe a UE or may be a UE-to-Network Relay, when the UE does not have avalid shared secret and/or GBA procedures are not available. This may beachieved using Generic Bootstrapping Architecture (GBA) Push procedurein 3GPP networks.

Before describing aspects of the invention, GBA and GBA Push will firstbe discussed.

Referring now to FIG. 3, this figure illustrates a reference GBAarchitecture. GBA is a framework which uses network operator controlledcredentials, such as 3GPP Authentication and Key Agreement (AKA)credentials, in the Universal Integrated Circuit Card (UICC) of devicesto provide keys for application security. The reference GBA architecturecomprises a UE 20, a Bootstrapping Server Function (BSF) 12, a NetworkApplication Function (NAF) 14, a Home Subscription Server (HSS) 16 and aSubscriber Location Function (SLF) 18. Exchanges between the BSF 12 andUE 20 through the reference point Ub enable the establishing of keymaterial Ks in both the BSF 12 and UE 20. The BSF 12 and UE 20 may theneach independently generate a NAF specific key, for example a Ks_NAF,which will be used to secure the reference point Ua between the UE 20and the NAF 14. Ks_NAF is generated using a Key Derivation Function(KDF) with inputs including the key material Ks, the IMPI of the UE 20and an identification of the NAF 14. The BSF 12 supplies the UE with aBootstrapping Transaction Identifier (B-TID) corresponding to theexchange as well as a lifetime of the key material Ks. The UE 20 maythen supply the B-TID to the NAF 14, enabling the NAF 14 to request thekey corresponding to the B-TID from the BSF 12. In response to therequest, the BSF 12 supplies Ks_NAF to the NAF 14, meaning the UE 20 andNAF 14 may communicate securely through the reference point Ua usingKs_NAF.

FIG. 4 illustrates a reference architecture for GBA Push. GBA Push isclosely related to GBA as described above and in TS 33.220, however itdiffers from GBA in that it is a mechanism to bootstrap the securitybetween a Network Application Function (NAF) and a UE, without requiringthe UE to contact a Bootstrapping Server Function (BSF) in the networkto initiate the bootstrapping. Referring to FIG. 4 where like for likereference numerals are retained when referring to the same features asin FIG. 3, the reference architecture comprises a UE 20, a BootstrappingServer Function (BSF) 12, a Network Application Function (NAF) 14, aHome Subscription Server (HSS) 16 and a Subscriber Location Function(SLF) 18. A NAF 14 seeking to establish secure communication with a UE20 registered for Push services requests information needed to establisha session shared key from the BSF 12. This information, known as GBAPush Information (GPI) is provided to the NAF 14 by the BSF 12 over theZpn reference point, together with the session shared key. The NAF 14stores the session shared key and forwards the GPI to the UE 20 over theUpa reference point. The UE 20 then processes the GPI to obtain thesession shared key. The UE 20 and NAF 14 are then both in possession ofthe session shared key which may be used to secure communication overthe Ua reference point.

Aspects of the present invention employ the reference GBA Pusharchitecture, with enhanced functionality in the NAF, to establish ashared key between a UE and a device, which key may be used over adirect communication interface such as a ProSe PC5 interface. Inparticular, GBA Push is used as a fall back option when the UE does nothave a valid shared secret for establishing a shared key and GBA is notavailable for the UE to retrieve a valid shared secret from the BSF. Anexample of when GBA is not available may be when the UE is out ofnetwork coverage.

In brief, in one embodiment when the UE has previously run GBA with itsBSF but the shared secret is no longer valid and GBA is not available,the UE uses the B-TID from the previous GBA procedure as a temporary IDor shared secret to run GBA Push. In this embodiment, the UE contactsthe device and indicates its identity in the form of its B-TID from theprevious GBA procedure. The device then contacts a Direct CommunicationElement, which may be a ProSe Function, ProSe Key Management Function(KMF) or ProSe Key Management Server (KMS), which then acts as a NAF forthe purposes of GBA Push. The device indicates the B-TID received fromthe UE and its own identity to the NAF. If the NAF considers that theB-TID is invalid (for example it has expired or it is too old for thepolicy of the NAF), it checks if it matches one of its stored B-TIDsfrom previous GBA procedures. If the B-TID does match, the NAF canidentify the UE and contacts a BSF in the UE's home PLMN to retrieve GPIand a session shared key (NAF key which may be Ks_NAF, Ks_int_NAF orKs_ext_NAF) corresponding to the UE identity from the BSF. The NAF thenderives a Direct Communication key K_DC (ProSe Direct Key) from the NAFkey and provisions both the Direct Communication key K_DC and the GPI tothe device.

The device then sends the GPI and its own identity to the UE. The UEprocesses the GPI to obtain the session shared key (NAF specific key),which may for example be a Ks_NAF, Ks_int_NAF or Ks_ext_NAF. The UE thenderives the Direct Communication key K_DC (ProSe Direct Key) in the samemanner as the NAF. The Direct Communication key K_DC is then availablein both the UE and the device for use on a direct communicationinterface such as the ProSe PC5 interface between the UE and the device.

In the above embodiment, it is a prerequisite that the UE and the DCEhave both stored the B-TID from the previous GBA procedure although itis or has since then become invalid. (An invalid B-TID or shared secretshould be understood to mean herein that it has expired or it is too oldfor the policy of the NAF.) The B-TID is used to identify the UE so thatthe DCE can apply GBA Push to obtain GPI and a session shared key.

The NAF involved in the provisioning of the Direct Communication key maybe operated by a 3GPP operator or a third party operator, for example aNational Security or Public Safety organisation having an agreement withthe 3GPP operator running the BSF. The device with which the UEcommunicates may be another UE for one-to-one communication or may be aUE-to-Network Relay.

FIGS. 5a, 5b and 6 illustrate methods according to aspects of thepresent invention performed in each of the UE, the device and the DirectCommunication Element. Actions at each entity are described below withreference to FIGS. 5a, 5b and 6.

FIG. 5a illustrates steps in a method 100 carried out at a UE forobtaining a key for direct communication with a device, which device maybe another UE or may be a UE-to-Network Relay. Referring to FIG. 5a , ina first step 106, the UE stores a transaction identifier received from abootstrapping server function, BSF, in a previous session. The UE thensends to the device a transaction identifier (which may be a B-TID) andrequests key generation for direct communication with the device, step107. In step 108, if the transaction identifier is invalid, the UEreceives from the device a device identifier and key generationinformation. The key generation information may for example be GBA PushInformation, (GPI). The UE then derives a session shared key from atleast the key generation information in step 109, and derives a directcommunication key K_DC from at least the session shared key and thedevice identifier in step 110.

Optional steps of method 100 will now be described. The method mayfurther comprise discovering the device through a discovery procedure. Aleast one of transaction identifier, the device identifier or therequest for key generation may be comprised within a discovery proceduremessage. The UE may further send a direct communication elementidentifier, direct key set identifier, DKSI, a list of securityalgorithms supported by the UE, and a nonce generated by the UE, to thedevice. The UE may also receive the DKSI, a lifetime, at least onesecurity algorithm chosen by the device from the list of securityalgorithms, said list of security algorithms supported by the UE and anonce generated by the device together with a Message AuthenticationCode, MAC, device identifier and key generation information.

The UE may send a confirmation message to the device indicating that theUE has derived the direct communication key. The MAC may be generatedusing the direct communication key or a key derived from the directcommunication key. If so, the UE may check the MAC with the deriveddirect communication key or a key derived from the direct communicationkey, generate a confirmation MAC using the direct communication key or akey derived from the direct communication key, and send the confirmationMAC with the confirmation message, wherein, if the check is successful,the confirmation message further indicates that the UE has successfullychecked the MAC.

The invalid transaction identifier may be used as an identifier of theUE. The interface comprises a Proximity Services, ProSe, interface. TheUE may not be able to initiate another GBA bootstrapping procedure. TheUE may not comprise a valid shared secret with a Bootstrapping ServerFunction, BSF.

FIG. 5b illustrates steps in a method 200 performed by a device forobtaining a key for direct communication with a UE. The device may be aUE, a UE-to-network Relay, or may be network node. Referring to FIG. 5b, in a first step 206, the device receives from the UE an invalidtransaction identifier of the UE and a request for key generation fordirect communication with the device. The device then sends to a DirectCommunication Element the transaction identifier and an identifier ofthe device, and requests the Direct Communication Element to provide thedevice with a direct communication key in step 207. The DirectCommunication Element may for example be a ProSe Function or ProSe KMSor ProSe KMF. In step 208, the device receives from the DirectCommunication Element the direct communication key and key generationinformation. Finally in step 209, the device sends the key generationinformation and the device identifier to the UE.

Optional steps of method 200 will now be described. The method mayfurther comprise discovering the UE through a discovery procedure. Atleast one of the transaction identifier, device identifier or therequest for key generation may be comprised within a discovery proceduremessage. The device may further receive from the UE a directcommunication element identifier, a direct key set identifier, DKSI, alist of security algorithms supported by the UE and a nonce generated bythe UE. The device may then send to the UE the DKSI, a lifetime, atleast one security algorithm chosen from the list of security algorithmssupported by the UE, said list of security algorithms supported by theUE and a nonce generated by the device. The device may also generate aMessage Authentication Code, MAC, using the direct communication key ora key derived from the direct communication key, and sending the MAC tothe UE with the key generation information and the device identifier.The device may further receive a confirmation message from the UEindicating that the UE has derived the direct communication key. Theconfirmation message may indicate that the UE has successfully checkedthe MAC

The invalid transaction identifier may be used as an identifier of theUE. The interface may comprise a Proximity Services, ProSe, interface,and the Direct Communication Element comprises at least one of ProSeFunction, a ProSe Key Management Function or a ProSe Key ManagementServer.

FIG. 6 illustrates steps in a method 300 performed by a DirectCommunication Element (DCE) for establishing a key for directcommunication over an interface between a UE and a device. The DCE maybe a ProSe Function or a ProSe KMS or ProSe KMF, and the device may be aUE, a UE-to-network Relay, or a Network node. Referring to FIG. 6, in afirst step 306, the DCE receives from the device a transactionidentifier, an identifier of the device and a request to provide adirect communication key to the device. In step 307, the DCE determinesif the transaction identifier is invalid. If the transaction identifieris invalid, the DCE uses the transaction identifier to identify the UE,step 308. The DCE then fetches key generation information and a sessionshared key from a bootstrapping server function, BSF, step 309. In thenext step, 310, the DCE derives a direct communication key from at leastthe session shared key and the device identifier. Then in a final step,311, the DCE sends the direct communication key and the key generationinformation to the device.

Optional method steps of method 300 will now be described. The methodmay further comprise using the transaction identifier to identify the UEby the direct communication element matching the transaction identifierwith a stored transaction identifier from a previous GenericBootstrapping Architecture procedure. The direct communication elementmay further map the matched transaction identifier to a public UEidentifier and sending the public UE identifier to the BSF. If thedirect communication element cannot match the transaction identifierwith a stored transaction identifier, the method may further comprisesending the transaction identifier to the BSF and receiving the sessionshared key and the key generation information from the BSF. The methodmay further comprise checking that at least one of the device or the UEis authorised to establish direct communication.

The interface may comprise a Proximity Services, ProSe, interface, andthe Direct Communication Element comprises at least one of a ProSeFunction, a ProSe Key Management Function or a ProSe Key ManagementServer.

In any of methods 100, 200 and 300 the device may comprise at least oneof a UE or a UE-to-Network Relay, and the key generation information maycomprise Generic Bootstrapping Architecture Push Information, GPI.Furthermore, the transaction identifier may be a bootstrappingtransaction identifier (B-TID).

The step of deriving the direct communication key, performed in the UEaccording to method 100 and in the DCE according to method 300, may beachieved in a range of different ways. In some examples, the directcommunication key may be derived using a Key Derivation Function (KDF),which may be any standard function such as the KDF defined in 3GPP TS33.220. Additional parameters to the session shared key and the deviceID mentioned above may be input to the KDF. Example additional inputparameters include B-TID, NAF-ID, KMS-ID, ProSe UE-ID, CK∥IK and otherinputs. The order of the input parameters may also be varied. Theselection of additional parameters and the variation in their order mayin some examples result in a more secure generation function. Inaddition, the input parameters may be transformed, hashed or otherwiseprocessed before they are input to the KDF to derive the directcommunication key. For example, a Ks_NAF could be transformed by firstbeing run through another (or the same) key derivation function and theresult input to the KDF, or another character sting could be used asinput. In the following description, references to the derivation of adirect communication key include the above disclosed options foradditional inputs and KDFs.

The above described methods 100, 200, 300 may be performed by elementscooperating to form a system for securing direct communication between aUE and a device over an interface. Such a system is illustrated in FIG.7 and comprises a UE 20, a device 30 and a Direct Communication Element(DCE) 40. The UE comprises means for sending an invalid transactionidentifier to the direct communication element via the device, and thedirect communication element comprises means for using the invalidtransaction identifier to identify the UE. The direct communicationelement further comprises means for obtaining a session shared key andGeneric Bootstrapping Architecture Push Information, GPI, deriving adirect communication key from at least the session shared key, andsending the direct communication key and the GPI to the device.Furthermore, the device comprises means for sending the GPI to the UE,and the UE comprises means for deriving the session shared key from atleast the GPI and to derive the direct communication key from thesession shared key.

The following discussion illustrates further examples of the inventionwith reference to ProSe communication as supported by a 3GPP network.However it will be appreciated that the invention is equally applicableto other direct communication technologies.

As previously discussed, aspects of the invention are particularlysuited to establishing a shared key for use by a UE already comprisingor possessing an invalid shared key from a previous GBA procedure butthat has gone out of network coverage. However it should be understoodthat the UE 20 may not be limited to a remote UE that is out of networkcoverage that wishes to secure one-to-one communication with another UE,or secure E-UTRAN access via a device acting as a UE-to-Network Relay,the present invention may also be applied to establish a shared key foruse by a UE which is within network coverage, but where GBA procedure isnot available for some other reason or GBA Push is preferred over GBA.

As also discussed above, the device 30, at which the method 200 isperformed, may be a UE, a UE-to-network Relay, or may be a network node.Furthermore, any reference herein to remote UE which is out of networkcoverage may use direct communication protocols to communicate not onlywith a dedicated UE-to-Network Relay but also with a directcommunication enabled UE which may act as a UE-to-Network Relay. It willtherefore be appreciated that while a device in the form of aUE-to-Network Relay is discussed in the following examples for thepurposes of illustration, aspects of the invention are applicable to usefor key establishment between a UE and other forms of device, forexample a device in the form of a second UE. In either case it isassumed that both the UE and the device have a UICC and are enabled forProSe.

Regardless of the nature of the device, it is possible that the UE anddevice may belong to the same Home PLMN or may belong to different HomePLMNs. Example applications of methods according to the presentinvention are described below for both these scenarios. The followingexample applications illustrate different ways in which the steps of themethods 100, 200, 300 described above may be implemented to achieve theabove discussed functionality.

EXAMPLE i UE and Device in Same HPLMN

The GBA Push and ProSe architecture for this example are illustrated inFIGS. 8 and 9. According to this example, the UE, referred to as RemoteUE 20 i, and the device, referred to as Relay 30 i, both belong to thesame Home PLMN (HPLMN). This example describes the device as a ProSeUE-to-Network Relay however the example is also applicable to one-to-onecommunication. Furthermore, in the following examples, the DCE is aProSe function acting as a NAF, but it will be appreciated that this ismerely for the purposes of illustration. The DCE may alternatively be aProSe KMS or a ProSe KMF.

As a preceding step, the Remote UE 20 i has performed a GBA procedurewith a BSF 50 i whilst in network coverage and obtained a shared secretsuch as a B-TID and related session shared key ((NAF key which may beKs_NAF, Ks_int_NAF or Ks_ext_NAF). It has also identified itself withits ProSe function 40 i, for example through a previous session, suchthat the ProSe function 40 i has stored the B-TID and its association tothe remote UE.

The Relay 30 i has E-UTRAN network coverage and is connected to thenetwork. The Relay 30 i uses ProSe Direct Discovery procedures to allowUEs in the vicinity to discover it. The Remote UE 20 i discovers theRelay 30 i using ProSe Direct Discovery procedures on the PC5 interface,for example having moved into the cell in which the Relay 30 i islocated. In some examples of the invention, discovery may be completedbefore the methods according to the present invention are carried out.In other examples, certain method steps may take place during thediscovery procedure.

The Remote UE 20 i sends its B-TID (transaction identifier) to the Relay30 i and requests a direct communication key for use with the Relay 30i. On receipt of this request, the Relay 30 i sends a request over thePC3 interface to its ProSe Function 40 i, which in the present exampleis the ProSe Function in the Home PLMN of both the Remote UE 20 i andthe Relay 30 i. The ProSe Function acts as a NAF 40 i for GBA Push. TheProSe Function 40 i checks whether the B-TID matches one of its storedB-TIDs and if it is valid. If the ProSe Function 40 i finds that theB-TID is invalid but that the B-TID matches one of its stored B-TIDsfrom previous sessions, then the ProSe Function 40 i uses the B-TID toidentify the UE 20 i. Having identified the remote UE 20 i, the ProSeFunction 40 i obtains GBA Push Information (GPI) and a session sharedkey from the BSF 50 i in the Home PLMN. The session shared key isreferred to in the present and following examples as a Ks_NAF for thepurposes of illustration. However it will be appreciated that thesession shared key may also or alternatively comprise other NAF specifickeys such as Ks_int_NAF and Ks_ext_NAF. The ProSe Function 40 i thenderives the required direct communication key, DC_K, from the sessionshared key Ks_NAF and the identity of the Relay 30 i. The ProSe Function40 i then sends both the GPI and the direct communication key DC_K tothe Relay 30 i. The Relay 30 i stores the direct communication key DC_Kand forwards the GPI to the Remote UE 20 i. On receipt of the GPI, theRemote UE 20 i derives the session shared key Ks_NAF from the GPI andthen derives the direct communication key DC_K from the session sharedkey Ks_NAF and the identity of the Relay 30 i. The direct communicationkey DC_K is then available in both the Remote UE 20 i and the Relay 30i.

Should the ProSe Function 40 i not successfully match the invalid B-TIDreceived from the relay 30 i, then it may forward it to the BSF 50 i andrequest a session shared key (NAF key), for the BSF to identify theremote UE 20 i using the invalid B-TID. If the BSF successfullyidentifies the remote UE 20 i, then it sends the session shared key andGPI to the ProSe Function 40 i, and the ProSe Function 40 i thenproceeds as described above.

The above steps are described in greater detail below with reference tothe messaging flow diagram in FIG. 10.

Referring to FIG. 10, Relay 30 i initially connects to the E-UTRAN,which connection may take place at any time before the following methodsteps. The Relay 30 i establishes a secure channel over PC3 when theProSe Function (DCE) acts as NAF or over PC8 when the ProSe KMF or ProSeKMS (DCE) acts as NAF. The Remote UE 20 i then performs GBA procedurewith the BSF whilst in network coverage, as represented by messageexchange 1001. During the GBA procedure, the Remote UE 20 i obtains ashared secret comprising a transaction identifier (B-TID) and a sessionshared key. It also identifies itself with its ProSe Function 40 iacting as a NAF, for example through a (unillustrated) session, where itsends the B-TID to the ProSe Function 40 i. The ProSe Function 40 i thenstores the B-TID and its association with the remote UE. The Remote UE20 i and Relay 30 i then discover each other through Direct Discoveryprocedures using Direct Discovery Model A or Direct Discovery Model B,step 1002.

Discovery may be initiated by either the Remote UE 20 i or the Relay 30i. In the illustrated example, discovery is initiated by the Relay 30 i.Step 1002 comprises the Relay 30 i issuing a discovery proceduremessage, which may be a Direct Discovery broadcast according to ProSeModel A or a Direct Discovery request message according to ProSe ModelB. The discovery procedure message includes an identity of the Relay 30i. The Remote UE 20 i receives the discovery procedure message and mayrespond, for example with a discovery procedure message comprising arequest message sent in response to a Direct Discovery broadcastaccording to ProSe Model A or a Direct Discovery response message inresponse to a Direct Discovery request message according to ProSe ModelB. In the illustrated example, the discovery procedure is completedbefore the subsequent method steps. However, in alternative examples,subsequent method steps may be combined with the discovery procedure, asdiscussed below.

In message 1003, the Remote UE 20 i sends a direct communication set uprequest message over PC5 to the Relay 30 i. The request includes theB-TID (acting as UE identifier) and a request for secure communication.The request may explicitly request generation of a key for directcommunication, or an indication that secure communication is requiredmay be contained within the Remote UE identity. In some embodiments, therequest message also comprises direct key set identifier (DKSI) foridentifying any keys resulting from the direct communication key, NAF-IDidentifying which ProSe Function of the Remote UE 20 i that is acting asNAF, a list of security algorithms supported by the Remote UE 20 i and anonce generated by the Remote UE 20 i (Nonce-UE-remote) used forauthentication as seen below. A nonce may for example be a sequencenumber, a random value or a timestamp.

In some examples of the invention (not illustrated) the directcommunication set up request message 1003 may be included in a discoveryprocedure message such as a discovery response message as discussedabove.

The Relay 30 i receives the request from the Remote UE 20 i and then, atstep 1004, the Relay sends a Retrieve ProSe Direct Key request over thePC3 or PC8 interface to the ProSe Function 40 i acting as a NAF. In thepresent example, both the Remote UE 20 i and the Relay 30 i are in thesame PLMN and so the ProSe Function is the Home ProSe Function for theRelay 30 i. The request to the ProSe Function includes at least theB-TID and the identity of the Relay 30 i and requests to provide a keyfor direct communication between the Remote UE 20 i and the Relay 30 i.

Upon receiving the request, the ProSe Function 40 i first checks whetheror not a UE associated with the NAF-ID is authorized to set up securecommunication over the PC5 interface by checking a database with a listof authorized identities at message exchange 1005. This database may belocal and supported by the DCE 40 i or may be implemented in a differentnetwork server. If the authorization is successful, the ProSe Function40 i checks if the B-TID is valid and if it has any associated sessionshared keys. Here, there are a few possible outcomes as represented bymessage exchange 1007;

-   -   If the B-TID and the associated session shared key is found at        the ProSe Function and are valid, then the ProSe Function 40 i        checks if the Remote UE 20 i associated with the B-TID is        authorized to set up security over PC5 with a UE belonging to        the same HPLMN. If authorization is successful, the ProSE        Function proceeds with step 1011 as described below.    -   If the B-TID and associated session shared key are found, but        they are invalid, (i.e. a match is found between an invalid        B-TID and a stored B-TID from a previous GBA session), the ProSe        Function proceeds with identifying the Remote UE 20 i based on        the B-TID and then checks if it is authorized to set up security        over PC5 with a UE belonging to the same HPLMN. If authorization        is successful, the process continues and the ProSe Function 40 i        sends a GPI request to the BSF 50 i. The identity of the Remote        UE 20 i is included in the message, as this identity will be        used as the public identity to obtain the correct subscription        and GPI according to the GBA push procedures defined in TS        33.223. Upon receiving the GPI and the session shared key, the        ProSe Function proceeds with step 1011 as described below.    -   If the ProSe Function cannot find the B-TID and associated        session shared key, (i.e. a match between an invalid B-TID and a        stored B-TID as not been successful), then the ProSe Function        sends the B-TID to the BSF 50 i and requests a session shared        key. If the BSF can identify the Remote UE 20 i based on the        B-TID, then the BSF sends a session shared key and GPI to the        ProSe Function 40 i. The ProSe Function 40 i then checks if the        Remote UE 20 i is authorized to set up security over PC5 with a        UE belonging to the same HPLMN. The ProSe Function 40 i then        proceeds with step 1011. Should the BSF not successfully        identify the Remote UE 20 i, then it notifies the ProSe Function        which in turn sends a bootstrapping renegotiation request to the        Remote UE. The Remote UE 20 i may in return provide a new B-TID        or a new UE identifier such as a ProSe UE ID, international        mobile subscriber identity, IMSI, mobile station international        subscriber directory number, MSISDN, ProSe Relay UE ID, ProSe        Discovery UE ID, ProSe Application code or ProSe Restricted code        as described below. However, briefly, should the ProSe Function        40 i receive a ProSe UE-ID, IMSI, MSISDN, ProSe Relay UE ID,        ProSe Discovery UE ID, ProSe application code or ProSe        Restricted code then the ProSe Function 40 i checks either of        these against a list to identify the Remote UE 20 i. The ProSe        UE-ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,        ProSe application code or ProSe Restricted code is then        translated or mapped to an appropriate public user identity if        needed. The ProSe Function 40 i then proceeds with requesting        session shared key and GPI from the BSF.

In any of the above scenarios wherein the Remote UE 20 i has beensuccessfully authorized, the BSF 50 i contacts the HSS 60 i to fetchappropriate authentication vectors and GBA User Security Settings (GUSS)according to TS 33.223, this is also represented by step 1007 in FIG.10. The BSF 50 i prepares the GPI and session shared key Ks_NAFaccording to the GBA push procedures defined in TS 33.223 and sends theGPI and Ks_NAF to the ProSe Function 40 i.

Upon receiving the GPI and Ks_NAF, the ProSe Function 40 i derives thedirect communication key DC_K to be provisioned to the Relay 30 i. TheProSe Function 40 i may further derive a lifetime for the directcommunication key. The ProSe Function 40 i calculates the directcommunication key DC_K at message exchange 1011 from the session sharedkey Ks_NAF and the Relay 30 i identity as follows:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF (session shared key) and the Relay 30 i identity.Additional inputs may be included such as the Remote UE identity, andprocessing of the inputs before inputting to the KDF may take place.

In message 1013, the ProSe Function sends a retrieve ProSe direct keyresponse comprising the GPI and the direct communication key DC_K to theRelay 30 i over the PC3 interface. The ProSe Function 40 i may also sendthe lifetime of the direct communication key if generated in messageexchange 1011.

The Relay 30 i stores the direct communication key DC_K and sends adirect security mode command message to the Remote UE 20 i over PC5,message 1014. This message comprises at least the GPI and the identityof the Relay 30 i. In a preceding message exchange 1013 b the Relay mayalso generate a session key (SK) from the direct communication key DC_K,Nonce-UE-remote and a nonce generated by the Relay 30 i (Nonce-UE-relay)as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )

The Relay 30 i may then further generate confidentiality key CK andintegrity key IK from session key KS and store them together with theDKSI and the lifetime in message exchange 1013 b. The confidentialitykey CK and the integrity key IK may be calculated as follows;

-   -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In this case, the direct security mode command message 1014 may furthercomprise the DKSI, lifetime, security algorithms chosen from the list ofsecurity algorithms received from the Remote UE 20 i, the list ofsecurity algorithms initially received from the Remote UE 20 i, andNonce-UE-remote. In the illustrated example, the message also contains aMessage Authentication Code (MAC). The method 200 performed at the Relaymay thus further comprise a step of generating a MAC using the integritykey. In an alternative embodiment, the MAC is generated using the directcommunication key or another key derived from the direct communicationkey.

Having received the GPI and Relay 30 i identity and optionally the DKSI,lifetime, security algorithms chosen by the Relay 30 i from the list ofsecurity algorithms supported by the Remote UE 20 i, the list ofsecurity algorithms itself, and Nonce-UE-remote, protected by the MAC,the Remote UE 20 i derives the direct communication key DC_K in messageexchange 1015. This comprises processing the GPI to obtain the sessionshared key Ks_NAF before then deriving the direct communication key DC_Kfrom the session shared key Ks_NAF and the Relay 30 i identity in asimilar manner to the ProSe Function 40 i. The Remote UE 20 i thuscalculates the direct communication key according to:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF and Relay ID. Additional inputs may be included, andprocessing of the inputs before inputting to the KDF may take place.

The Remote UE 20 i further derives session key (SK) from the directcommunication, Nonce-UE-remote and Nonce-UE-relay, and confidentialityand integrity keys from session key KS, similarly to the Relay 30 i.Again, additional inputs may be included, and processing of the inputsbefore inputting to the KDF may take place. The Remote UE 20 i thuscalculate the session key SK and the confidentiality key CK andintegrity key IK as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )    -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In message exchange 1015, the Remote UE 20 i checks the MAC receivedfrom the Relay 30 i in the direct security mode command message 1014. Ifthe MAC was generated using the integrity key IK, then the MAC may bechecked by the Remote UE 20 i using the integrity key IK which theRemote UE 20 i has just derived. If the MAC was generated using adifferent key, for example the direct communication key DC_K, then thatkey may be used to check the MAC. If the check is successful, then theRemote UE 20 i responds with a direct security mode complete message (ora confirmation message) to the Relay 30 i indicating that the check wassuccessful and protects the response message with a MAC using integritykey IK, message exchange 1016.

Although not illustrated in FIG. 10, the Relay 30 i checks the MACreceived in message 1016 using integrity key IK. If the check issuccessful, then the Relay 30 i knows that the Remote UE 20 i shares thesame direct communication key DC_K as the Relay 30 i. The Relay 30 i cannow use the direct communication key DC_K for direct communication onthe PC5 interface with the Remote UE 20 i.

As described above Nonce-UE-remote and Nonce-UE-relay are included ingeneration of the session key KS. The Nonce-UE-remote and Nonce-UE-relayare generated by the Remote UE 20 i and the Relay 30 i, respectively,and are used for mutual authentication. A nonce may for example be asequence number, a random value or a timestamp. As the MACs describedabove are generated using integrity key IK based on at least theNonce-UE-remote and Nonce-UE-relay, in practice this means that RemoteUE 20 i and the Relay 30 i authenticate one another.

EXAMPLES ii UE and Device in Different HPLMNs

This embodiment is similar to that wherein the UE and Device belong tothe same HPLMN, however additional messages are exchanged between theDCE of the Remote E and the Relay. The DCE 40Aii of the Remote UE andthe DCE 40Bii of the Relay may comprise a ProSe function, a ProSe KMS orProSe KMF of the relevant PLMN. The DCE 40Aii of the Remote UE acts as aNAF. In the following examples, the DCE is a ProSe function, but it willbe appreciated that this is merely for the purposes of illustration. Insome examples, the DCE may comprise a ProSe Function in each of thePLMNs, each Function or server acting as a sub-Element of the DirectCommunication Element. For example, a ProSe Function in the Remote UEPLMN may act as a NAF for the bootstrapping procedure, as a firstsub-Element, with a ProSe Function in the device PLMN deliveringmessages to and from the Relay, as a second sub-Element. Each ProSeFunction may also authorize the entity (Remote UE or Relay) in its ownPLMN.

The ProSe architecture for Example ii is illustrated in FIG. 11. ThePLMN of the UE 20 ii (Remote UE) is designated as PLMN A, with BSF 50Aiiand ProSe Function 40Aii, which acts as NAF 40Aii. The PLMN of thedevice 30 ii (Relay) is designated as PLMN B. The DCE comprises twosub-Elements: the Home ProSe Function 40Aii of PLMN A, which acts as NAF40Aii, and the Home ProSe Function 40Bii of PLMN B, which acts as arelay and shares the process of authorization. The BSF of PLMN B is notinvolved in the following examples, as the GPI and session shared keyare provided by the BSF of the UE Home PLMN, BSF 50Aii.

This example is also similar to example i described above, with theexception that the ProSe Functions of two PLMNs are involved. The ProseFunction of the UE acts as the NAF for GBA Push and the ProSe Functionof the device acts as a proxy conveying messages and also contributes tothe authorisation process.

The GBA Push architecture for this example is illustrated in FIG. 12.According to this example, the UE, referred to as Remote UE 20 ii, andthe device, referred to as Relay 30 ii, belong to different Home PLMNs.The Relay 30 ii has E-UTRAN network coverage and is connected to thenetwork. The Remote UE 20 ii initiates GBA bootstrapping whilst innetwork coverage and receives a B-TID and related session shared keysfrom the BSF 50Aii belonging to the Home PLMN of the Remote UE 20 ii. Italso identifies itself with its ProSe Function acting as a NAF 40Aii,for example through a (unillustrated) session, where it sends the B-TIDto the ProSe Function 40Aii. The ProSe Function 40Aii then stores theB-TID and its association with the remote UE 20 ii.

In the next steps, GBA procedure is no longer available, because theRemote UE may be out of network coverage, or alternatively, GBA push maybe a preferred method.

The Relay 30 ii is using ProSe Direct Discovery procedures to allow UEsin the vicinity to discover it. The Remote UE 20 ii discovers the Relay30 iii using ProSe Direct Discovery procedures on the PC5 interface, forexample having moved into the cell in which the Relay 30 ii is located.In some examples of the invention, discovery may be completed before themethods according to the present invention are carried out. In otherexamples, certain method steps may take place during the discoveryprocedure.

The Remote UE 20 ii sends its B-TID received in the previous GBAprocedure to the Relay 30 ii and requests a direct communication key foruse with the Relay 30 ii. On receipt of this request, the Relay 30 iisends a request over the PC3 interface to its own ProSe Function 40Bii,which is a sub-Element of the DCE 40 in this example. The Relay HomeProSe Function 40Bii passes the request to the ProSe Function in thePLMN of the Remote UE 40Aii, which in the present example acts as a NAF40Aii for GBA Push. The NAF 40Aii checks whether the B-TID matches oneof its stored B-TIDs and if it is valid. If the NAF 40Aii finds that theB-TID is invalid but that the B-TID matches one of its stored B-TIDsfrom previous sessions, then the NAF 40Aii uses the B-TID to identifythe UE 20 ii. Having identified the remote UE 20 ii, the NAF 40Aiiobtains GBA Push Information (GPI) and a session shared key from the BSF50Aii in the Home PLMN of the Remote UE 20 ii. The NAF 40Aii thenderives the required direct communication key, DC_K, from the sessionshared key Ks_NAF and the identity of the Relay 30 ii. The NAF 40Aiithen sends both the GPI and the direct communication key DC_K to theHome ProSe Function 40Bii of the Relay 30 ii, which forwards the GPI andthe direct communication key DC_K to the Relay 30 ii. The Relay 30 iistores the direct communication key DC_K and forwards the GPI to theRemote UE 20 ii. On receipt of the GPI, the Remote UE 20 ii derives thesession shared key Ks_NAF from the GPI and then derives the directcommunication key DC_K from the session shared key Ks_NAF and theidentity of the Relay 30 ii. The direct communication key DC_K is thenavailable in both the Remote UE 20 ii and the Relay 30 ii.

The above steps are described in greater detail below with reference tothe messaging flow diagram in FIG. 13.

Referring to FIG. 13, Relay 30 ii initially connects to the E-UTRAN,which connection may take place at any time before the following methodsteps. The Relay 30 ii establishes a secure channel over PC3 when theProSe Function (DCE) acts as NAF or over PC8 when the ProSe KMF or ProSeKMS (DCE) acts as NAF. The Remote UE 20 ii then performs GBA procedurewith BSF whilst in network coverage, as represented by message exchange1301. During the GBA procedure, the Remote UE 20 ii obtains a sharedsecret comprising a transaction identifier (B-TID) and a session sharedkey. It also identifies itself with its ProSe Function 40Aii, forexample through a (unillustrated) session, where it sends the B-TID tothe ProSe Function 40Aii. The ProSe Function 40Aii then stores the B-TIDand its association with the remote UE.

The Remote UE 20 ii and Relay 30 ii then discover each other throughDirect Discovery procedures using Direct Discovery Model A or DirectDiscovery Model B, message exchange 1302.

Discovery may be initiated by either the Remote UE 20 ii or the Relay 30ii. In the illustrated example, discovery is initiated by the Relay 30ii. Step 1302 comprises the Relay 30 ii issuing a discovery proceduremessage, which may be a Direct Discovery broadcast according to ProSeModel A or a Direct Discovery request message according to ProSe ModelB. The discovery procedure message includes an identity of the Relay 30ii. The Remote UE 20 ii receives the discovery procedure message and mayrespond, for example with discovery procedure message comprising arequest message sent in response to a Direct Discovery broadcastaccording to ProSe Model A or a Direct Discovery response message inresponse to a Direct Discovery request message according to ProSe ModelB. In the illustrated example, the discovery procedure is completedbefore the subsequent method steps. However, in alternative examples,subsequent method steps may be combined with the discovery procedure, asdiscussed below.

In the next steps, GBA procedure is no longer available, because theRemote UE may be out of network coverage, or alternatively, GBA push maybe a preferred method.

In step 1303, the Remote UE 20 ii sends a direct communication set uprequest message over PC5 to the Relay 30 ii. The request includes theB-TID (acting as UE identifier) and a request for secure communication.The request may explicitly request generation of a key for directcommunication, or an indication that secure communication is requiredmay be contained within the Remote UE identity. In some embodiments, therequest message also comprises direct key set identifier (DKSI) foridentifying any keys resulting from the direct communication key, NAF-IDidentifying which ProSe Function of the Remote UE 20 ii that is actingas NAF, a list of security algorithms supported by the Remote UE 20 iiand a nonce generated by the Remote UE 20 i (Nonce-UE-remote) used forauthentication as seen below. A nonce may for example be a sequencenumber, a random value or a timestamp.

In some examples of the invention (not illustrated) the directcommunication set up request message 1303 may be included in a discoveryprocedure message such as a discovery response message as discussedabove.

The Relay 30 ii receives the request from the Remote UE 20 ii and then,at step 1304, the Relay sends a Retrieve ProSe Direct Key request overthe PC3 interface to the ProSe Function 40Bii of the Relay. The requestincludes the B-TID and the identity of the Relay 30 ii and requests theProSe Function to provide a key for direct communication between theRemote UE 20 ii and the Relay 30 ii.

Upon receiving the request, the ProSe Function 40Bii first checkswhether or not a UE from the HPLMN associated with the NAF-ID isauthorized to set up secure communication over the PC5 interface bychecking a database with a list of authorized identities at messageexchange 1305. This database may be local and supported by the ProSeFunction 40Bii or may be implemented in a different network server. Ifthe authorization is successful, the ProSe Function 40Bii of the Relay30 ii sends a ProSe key request over PC6 to ProSe Function 40Aii ofRemote UE 20 ii, message 1306. The request includes the B-TID receivedfrom the Remote UE 20 ii and Relay identifier (Relay ID).

Upon receiving the request from the ProSe Function 40Bii of the Relay,the ProSe Function 40Aii of the Remote UE checks if the B-TID matchesone of its stored B-TIDs and associated session shared keys, and if theyare valid. Here, there are a few possible outcomes as represented bymessage exchange 1307;

-   -   If the B-TID and the session shared key are found at the ProSe        Function and are valid, then the ProSe Function 40Aii checks if        the Remote UE 20 ii associated with the B-TID is authorized to        set up security over PC5 with a UE belonging to a different        HPLMN, HPLMN B. If authorization is successful, the ProSe        Function proceeds with step 1311 as described below.    -   If the B-TID and associated session shared key are found, but        they are invalid, (i.e. a match is found between an invalid        B-TID and a stored B-TID from a previous GBA session), the ProSe        Function 40 ii proceeds with identifying the Remote UE 20 i        based on the B-TID and then checks if it authorized to set up        security over PC5 with a UE belonging to a different HPLMN,        HPLMN B. If authorization is successful, the process continues        and the ProSe Function 40Aii sends a GPI request to the BSF        50Aii. The identity of the Remote UE 20 ii is included in the        message, as this identity will be used as the public identity to        obtain the correct subscription and GPI according to the GBA        push procedures defined in TS 33.223. Upon receiving the GPI and        the session shared key, the ProSe Function 40Aii proceeds with        step 1311 as described below.    -   If the ProSe Function cannot find the B-TID and associated        session shared key, (i.e. a match between an invalid B-TID and a        stored B-TID as not been successful), then the ProSe Function        sends the B-TID to the BSF 50Aii of the same HPLMN and requests        a session shared key. If the BSF 50Aii can identify the Remote        UE 20 ii based on the B-TID, then the BSF sends a session shared        key and GPI to the ProSe Function 40Aii. The ProSe Function        40Aii then checks if the Remote UE 20 i is authorized to set up        security over PC5 with a UE belonging to the a different HPLMN,        HPLMN B. The ProSe Function 40Aii then proceeds with step 1311.        Should the BSF 50Aii not successfully identify the Remote UE 20        ii, then it notifies the ProSe Function 40Aii which in turn        sends a bootstrapping renegotiation request to the Remote UE.        The Remote UE 20 ii may in return provide a new B-TID or a new        UE identifier such as a ProSe UE ID, international mobile        subscriber identity (IMSI), mobile station international        subscriber directory number (MSISDN), ProSe Relay UE ID, ProSe        Discovery UE ID, ProSe Application code or ProSe Restricted code        as described below. However, briefly, should the ProSe Function        40Aii receive a ProSe UE-ID, IMSI, MSISDN, ProSe Relay UE ID,        ProSe Discovery UE ID, ProSe Application code or ProSe        Restricted code then the ProSe Function 40Aii checks either of        these against a list to identify the Remote UE 20 ii. The ProSe        UE-ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,        ProSe Application code or ProSe Restricted code is then        translated or mapped to an appropriate public user identity if        needed. The ProSe Function 40Aii then proceeds with requesting        session shared key and GPI from the BSF 50Aii.

In any of the above scenarios wherein the Remote UE 20 ii has beensuccessfully authorized, the BSF 50Aii contacts the HSS 60Aii of thesame HPLMN as the Remote UE to fetch appropriate authentication vectorsand GBA User Security Settings (GUSS) according to TS 33.223, this isalso represented by step 1307 in FIG. 13. The BSF 50Aii prepares the GPIand session shared key Ks_NAF according to the GBA push proceduresdefined in TS 33.223 and sends the GPI and Ks_NAF to the ProSe Function40Aii.

Upon receiving the GPI and Ks_NAF, the ProSe Function 40Aii derives thedirect communication key DC_K to be provisioned to the Relay 30 i. TheProSe Function 40Aii may further derive a lifetime for the directcommunication key. The ProSe Function 40Aii calculates the directcommunication key DC_K at message exchange 1311 from the session sharedkey Ks_NAF and the Relay 30 ii identity as follows:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF (session shared key) and the Relay 30 ii identity.Additional inputs may be included such as the Remote UE identity, andprocessing of the inputs before inputting to the KDF may take place.

The ProSe Function 40Aii then sends the direct communication key DC_K,GPI, and the lifetime if generated, to the ProSe Function 40Bii of theRelay in a ProSe key response over PC6 interface, message 1312.

In message 1313, the ProSe Function 40Bii sends a retrieve ProSe directkey response comprising the GPI and the direct communication key DC_K tothe Relay 30 ii over the PC3 interface. The ProSe Function 40Bii mayalso send the lifetime of the direct communication key if generated inmessage exchange 1311.

The Relay 30 ii stores the direct communication key DC_K and sends adirect security mode command message to the Remote UE 20 ii over PC5,message 1314. This message comprises at least the GPI and the identityof the Relay 30 ii. In a preceding message exchange 1313 b the Relay mayalso generate a session key (SK) from the direct communication key DC_K,Nonce-UE-remote and a nonce generated by the Relay 30 i (Nonce-UE-relay)as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )

The Relay 30 ii may then further generate confidentiality key CK andintegrity key IK from session key KS and store them together with theDKSI and lifetime in message exchange 1313 b. The confidentiality key CKand the integrity key IK may be calculated as follows;

-   -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In this case, the direct security mode command message 1314 may furthercomprise the DKSI, lifetime, security algorithms chosen from the list ofsecurity algorithms received from the Remote UE 20 ii, the list ofsecurity algorithms initially received from the Remote UE 20 ii, andNonce-UE-remote. In the illustrated example, the message also contains aMessage Authentication Code (MAC). The method 200 performed at the Relaymay thus further comprise a step of generating a MAC using the integritykey. In an alternative embodiment, the MAC is generated using the directcommunication key or another key derived from the direct communicationkey.

Having received the GPI and Relay 30 ii identity and optionally theDKSI, lifetime, security algorithms chosen from the list of securityalgorithms supported by the Remote UE 20 ii, the list of securityalgorithms itself, and Nonce-UE-remote protected by the MAC, the RemoteUE 20 ii derives the direct communication key DC_K in message exchange1315. This comprises processing the GPI to obtain the session shared keyKs_NAF before then deriving the direct communication key DC_K from thesession shared key Ks_NAF and the Relay 30 ii identity in a similarmanner to the ProSe Function 40Aii. The Remote UE 20 ii thus calculatesthe direct communication key according to:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF and Relay ID. Additional inputs may be included, andprocessing of the inputs before inputting to the KDF may take place.

The Remote UE 20 ii further derives session key (SK) from the directcommunication, Nonce-UE-remote and Nonce-UE-relay, and confidentialityand integrity keys from session key KS, similarly to the Relay 30 ii.Again, additional inputs may be included, and processing of the inputsbefore inputting to the KDF may take place. The Remote UE 20 ii thuscalculate the session key SK and the confidentiality key CK andintegrity key IK as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )    -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In message exchange 1315, the Remote UE 20 i checks the MAC receivedfrom the Relay 30 ii in the direct security mode command message 1314.If the MAC was generated using the integrity key IK, then the MAC may bechecked by the Remote UE 20 ii using the integrity key IK which theRemote UE 20 i has just derived. If the MAC was generated using adifferent key, for example the key direct communication key DC_K, thenthat key may be used to check the MAC. If the check is successful, thenthe Remote UE 20 ii responds with a direct security mode completemessage (or a confirmation message) to the Relay 30 ii indicating thatthe check was successful and protects the response message with a MACusing integrity key IK, message exchange 1316.

Although not illustrated in FIG. 10, the Relay 30 ii checks the MACreceived in message 1316 using integrity key IK. If the check issuccessful, then the Relay 30 ii knows that the Remote UE 20 ii sharesthe same direct communication key DC_K as the Relay 30 i. The Relay 30ii can now use the direct communication key DC_K for directcommunication on the PC5 interface with the Remote UE 20 ii.

As described in previous examples, Nonce-UE-remote and Nonce-UE-relaymay be included in generation of the session key KS. The Nonce-UE-remoteand Nonce-UE-relay are generated by the Remote UE 20 i and the Relay 30i, respectively, and are used for mutual authentication. A nonce may forexample be a sequence number, a random value or a timestamp. As the MACsdescribed above are generated using integrity key IK based on at leastthe Nonce-UE-remote and Nonce-UE-relay, in practice this means thatRemote UE 20 i and the Relay 30 i authenticate one another.

As described above, the ProSe Function 50Aii of the Remote UE acts as aNAF, however it should be understood that it is also in the scope of thepresent invention for the ProSe Function 50Bii of the Relay 30 ii to actas the NAF instead of the ProSe Function 50Aii of the Remote UE.

Another aspect of the invention will now be described. Similarly to theembodiments described above, also this aspect of the present inventionemploy the reference GBA Push architecture, with enhanced functionalityin the NAF, to establish a shared key between a UE and a device, whichkey may be used over a direct communication interface such as a ProSePC5 interface. In this case, GBA Push may be used as a fall back optionwhen the UE does not have a valid shared secret for establishing ashared key and GBA is not available for the UE to retrieve a validshared secret from the BSF. An example of when GBA is not available maybe when the UE is out of network coverage. However, this aspect as willnow be described may also be employed as a preferred option over GBAprocedure.

In brief, in this embodiment the UE may or may not have previously runGBA with its BSF, however regardless of whether it has, the UE uses anyof its ProSe UE ID, international mobile subscriber identity (IMSI),mobile station international subscriber directory number (MSISDN), ProSeRelay UE ID, ProSe Discovery UE ID, ProSe Application code or ProSeRestricted code to initiate GBA Push. This is achieved by the UE firstcontacting the device and indicating its identity in the form of itsProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code. The device thencontacts a Direct Communication Element, which may be a ProSe Function,ProSe Key Management Function (KMF) or ProSe Key Management Server(KMS), which then acts as a NAF for the purposes of GBA Push. The deviceindicates the ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSeDiscovery UE ID, ProSe Application code or ProSe Restricted codereceived from the UE and its own identity to the NAF. The NAF identifiesthe UE based on the ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSeDiscovery UE ID, ProSe Application code or ProSe Restricted code andthen translates or maps it to an appropriate public user identity ifneeded. The NAF then contacts a BSF in the UE's home PLMN to retrieveGPI and a session shared key (NAF key which may be Ks_NAF, Ks_int_NAF orKs_ext_NAF) corresponding to the UE identity from the BSF. The NAF thenderives a Direct Communication key K_DC (ProSe Direct Key) from the NAFkey and provisions both the Direct Communication key K_DC and the GPI tothe device.

The device then sends the GPI and its own identity to the UE. The UEprocesses the GPI to obtain the session shared key (NAF specific key),which may for example be a Ks_NAF, Ks_int_NAF or Ks_ext_NAF. The UE thenderives the Direct Communication key K_DC (ProSe Direct Key) in the samemanner as the NAF. The Direct Communication key K_DC is then availablein both the UE and the device for use on a direct communicationinterface such as the ProSe PC5 interface between the UE and the device.

In the above embodiment, it may be that the UE cannot run a GBAprocedure and does not have a valid B-TID, and so sends either its ProSeUE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to the device as a UEidentifier. Alternatively, it may be that the UE has receivedbootstrapping renegotiation request in response to trying to establish adirect communication key but is not able to re-run the GBA procedure andso instead sends ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSeDiscovery UE ID, ProSe Application code or ProSe Restricted code toidentify itself.

The ProSe UE ID, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code and ProSe restricted code are assigned to each ProSeenabled UE by its ProSe Function, ProSe KMF or ProSe KMS. The ProSe UEID, ProSe Relay UE ID, ProSe Discovery UE ID, ProSe Application code andProSe restricted code are described in TS 23.303. However, they will nowbe briefly described.

ProSe UE ID is a link layer identifier that is used as a source Layer-2ID in all packets a UE sends for ProSe direct communication. The ProSeUE ID is assigned by the ProSe Key Management function (including KMSand ProSe function) as defined in TS33.303. The ProSe Key ManagementFunction ensures that the ProSe UE ID is unique in the context ofone-to-many ProSe direct communication for a group. The ProSe UE ID isnot necessarily globally unique and so the UE should be prepared tohandle any conflict of ProSe UE IDs should it arise.

The ProSe Relay UE ID is an identifier of the relay and it is alsoassigned by the ProSe KMF. It is a link layer identifier that is usedfor direct communication and is associated with a public data networkconnection the ProSe UE-to Network Relay has established.

ProSe discovery UE ID (PDUID) is a temporary identifier assigned by theProSe Function (including KMS and KMF) in the HPLMN to the UE forrestricted direct discovery service. It includes the PLMN ID and atemporary identifier that uniquely identifies the UE in the HPLMN.

ProSe Application code is associated with ProSe application ID and isused in discovery procedures, and in particular open discovery. (ProSeapplication ID is an identity used for ProSe direct discovery,identifying application related information for the ProSe enabled UE.)

ProSe restricted code is allocated by the ProSe Function (including KMSand KMF) in the HPLMN for Restricted Direct Discovery and is associatedwith one or more Restricted ProSe App User IDs based on the policy ofthe ProSe Function that allocates it.

The ProSe UE ID, ProSe relay UE ID, ProSe discovery UE ID and ProSeapplication code and ProSe restricted code can also be referred hereinas ProSe ID. As these identifiers are assigned by the ProSe function,they do not form part of the hardware in the UE.

IMSI is used to identify the user of a cellular network and is a uniqueidentification associated with all cellular networks. It uniquelyidentifies the UE, its home wireless network, and the home country ofthe home wireless network. It is stored as a 64 bit field and is sent bythe phone to the network.

MSISDN is a number uniquely identifying a subscription in a mobilenetwork.

Similar to the above, the NAF involved in the provisioning of the DirectCommunication key may be operated by a 3GPP operator or a third partyoperator, for example a National Security or Public Safety organisationhaving an agreement with the 3GPP operator running the BSF. The devicewith which the UE communicates may be another UE for one-to-onecommunication or may be a UE-to-Network Relay.

FIGS. 14, 15 and 16 illustrate methods according to aspects of thepresent invention performed in each of the UE, the device and the DirectCommunication Element. Actions at each entity are described below withreference to FIGS. 14, 15 and 16.

FIG. 14 illustrates steps in a method 100 k carried out at a UE forobtaining a key for direct communication with a device, which device maybe another UE or may be a UE-to-Network Relay. Referring to FIG. 14, ina first step 106 k, the UE sends to a device a UE identifier comprisingany of ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UEID, ProSe Application code or ProSe Restricted code. In the next step,107 k, the UE receives from the device a device identifier and keygeneration information. The key generation information may for examplebe GBA Push Information, (GPI). The UE then derives a session shared keyfrom at least the key generation information in step 108 k, and derivesa direct communication key K_DC from at least the session shared key andthe device identifier in step 109 k.

Optional steps of method 100 will now be described. The method maycomprise discovering the device through a discovery procedure. At leastone of the UE identifier, the device identifier or the request for keygeneration may be comprised within a discovery procedure message. The UEmay further send to the device, a direct communication elementidentifier, direct key set identifier, DKSI, a list of securityalgorithms supported by the UE, and a nonce generated by the UE. The UEmay receive a Message Authentication Code, MAC, with the deviceidentifier and key generation information, wherein the MAC is generatedusing the direct communication key or a key derived from the directcommunication key. The UE may also receive the DKSI, a lifetime, atleast one security algorithm chosen by the device from the list ofsecurity algorithms, said list of security algorithms supported by theUE, together with the MAC, device identifier and key generationinformation. The UE may also send a confirmation message to the deviceindicating that the UE has derived the direct communication key. The UEmay also check the MAC with the derived direct communication key or akey derived from the direct communication key, generate a confirmationMAC using the direct communication key or a key derived from the directcommunication key; and send the confirmation MAC with the confirmationmessage; wherein, if the check is successful, the confirmation messagefurther indicates that the UE has successfully checked the MAC.

The method may further comprising, as a preceding step, requesting keygeneration for direct communication with the device, and in responsereceiving from the device a Generic Bootstrapping Architecture, GBA,renegotiation request. The method may also comprise as a preceding step,sending a temporary key to the device and receiving in response arequest for a new temporary key, and then sending the UE identifierinstead of a new temporary key. In another preceding step, the methodmay comprise receiving the ProSe UE ID, ProSe Relay UE ID, ProSeDiscovery UE ID, ProSe Application code or ProSe Restricted code fromthe Direct Communication element.

The interface may comprise a Proximity Services, ProSe, interface. TheUE may not be able to initiate a Generic bootstrapping architecture,GBA, procedure. Furthermore, the UE may not comprise a valid sharedsecret with a Bootstrapping Server Function, BSF.

FIG. 15 illustrates steps in a method 200 k performed by a device forobtaining a key for direct communication with a UE. The device may be aUE, a UE-to-network Relay, or may be network node. Referring to FIG. 15,in a first step 206 k, the device receives a UE identifier comprisingany of ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UEID, ProSe Application code or ProSe Restricted code and request for keygeneration for direct communication with the device. The device thensends to a Direct Communication Element the UE identifier and anidentifier of the device, and requests the Direct Communication Elementto provide the device with a direct communication key in step 207 k. TheDirect Communication Element may for example be a ProSe Function orProSe KMS or ProSe KMF. In step 208 k, the device receives from theDirect Communication Element the direct communication key and keygeneration information. Finally in step 209 k, the device sends the keygeneration information and the device identifier to the UE.

A method as claimed in claim 48, wherein the interface comprises aProximity Services, ProSe, interface, and the Direct CommunicationElement comprises at least one of ProSe Function, ProSe Key ManagementServer, a ProSe Key Management Function.

Optional steps of method 200 k will now be described. The method mayfurther comprise discovering the UE through a discovery procedure. Atleast one of the UE identifier, device identifier and the request forkey generation may be comprised within a discovery procedure message.The device may receiving a direct communication element identifier, adirect key set identifier, a list of security algorithms supported bythe UE and a nonce generated by the UE. The device may also send to theUE the DKSI, a lifetime, at least one security algorithm chosen by thedevice from the list of security algorithms supported by the UE, saidlist of algorithms supported by the UE, and a nonce generated by thedevice. The method may further comprise generating a MessageAuthentication Code, MAC, using the direct communication key or a keyderived from the direct communication key and sending the MAC to the UEwith the key generation information and the device identifier. Thedevice may also receive a confirmation message from the UE indicatingthat the UE has derived the direct communication key. The confirmationmessage may indicate that the UE has successfully checked the MAC.

FIG. 16 illustrates steps in a method 300 k performed by a DirectCommunication Element (DCE) for establishing a key for directcommunication over an interface between a UE and a device. The DCE maybe a ProSe Function or a ProSe KMS or ProSe KMF, and the device may be aUE, a UE-to-network Relay, or a Network node. Referring to FIG. 16, in afirst step 306 k, the DCE receives from the device a UE identifiercomprising any of ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSeDiscovery UE ID, ProSe Application code or ProSe Restricted code, anidentifier of the device and a request to provide a direct communicationkey to the device. In step 308 k, the DCE identifies the UE from the UEidentifier. The DCE then fetches key generation information and asession shared key from a bootstrapping server function, BSF, step 309k. In the next step, 310 k, the DCE derives a direct communication keyfrom at least the session shared key and the device identifier. Then ina final step, 311 k, the DCE sends the direct communication key and thekey generation information to the device.

Optional features of method 300 k will now be described. The method mayfurther comprise mapping the identified UE to a public UE identifier andsending the public UE identifier to the BSF. The method may also furthercomprise checking that at least one of the device or the UE isauthorised to establish direct communication. The method may as apreceding step, comprise generating a ProSe UE ID, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codeand providing it to the UE.

The interface may comprise a Proximity Services, ProSe, interface, andthe Direct Communication Element comprises at least one of a ProSeFunction, a ProSe Key Management Function or a ProSe Key ManagementServer.

In any of methods 100 k, 200 k and 300 k the device comprises at leastone of a UE or a UE-to-Network Relay. The key generation information maycomprise Generic Bootstrapping Architecture Push Information, GPI.

The step of deriving the direct communication key, performed in the UEaccording to method 100 k and in the DCE according to method 300 k, maybe achieved in a range of different ways. In some examples, the directcommunication key may be derived using a Key Derivation Function (KDF),which may be any standard function such as the KDF defined in 3GPP TS33.220. Additional parameters to the session shared key and the deviceID mentioned above may be input to the KDF. Example additional inputparameters include B-TID, NAF-ID, KMS-ID, ProSe UE-ID, CK∥IK and otherinputs. The order of the input parameters may also be varied. Theselection of additional parameters and the variation in their order mayin some examples result in a more secure generation function. Inaddition, the input parameters may be transformed, hashed or otherwiseprocessed before they are input to the KDF to derive the directcommunication key. For example, a Ks_NAF could be transformed by firstbeing run through another (or the same) key derivation function and theresult input to the KDF, or another character sting could be used asinput. In the following description, references to the derivation of adirect communication key include the above disclosed options foradditional inputs and KDFs.

The above described methods 100 k, 200 k, 300 k may be performed byelements cooperating to form a system for securing direct communicationbetween a UE and a device over an interface. Such a system can also beillustrated in FIG. 7 and comprises a UE 20 k, a device 30 k and aDirect Communication Element (DCE) 40 k. The UE comprises means forsending a UE identifier comprising a ProSe UE ID, international mobilesubscriber identity, IMSI, or mobile station international subscriberdirectory number, MSISDN to the direct communication element via thedevice. The direct communication element comprises means for identifyingthe UE using the UE identifier, obtaining a session shared key andGeneric Bootstrapping Architecture Push Information, GPI, deriving adirect communication key from at least the session shared key, andsending the direct communication key and the GPI to the device. Thedevice comprises means for sending the GPI to the UE and the UEcomprises means for deriving the session shared key from at least theGPI and to derive the direct communication key from the session sharedkey.

The following discussion illustrates further examples of the inventionwith reference to ProSe communication as supported by a 3GPP network.However it will be appreciated that the invention is equally applicableto other direct communication technologies.

As previously discussed, aspects of the invention are particularlysuited to establishing a shared key for use by a UE and a device overthe PC5 interface. This is achieved using ProSe UE ID, IMSI, MSISDN,ProSe Relay UE ID, ProSe Discovery UE ID, ProSe Application code orProSe Restricted code as a UE identifier and this may be employed whenGBA is not available, for example when the UE is out of networkcoverage. However it should be understood that the UE may not be limitedto a remote UE that is out of network coverage that wishes to secureone-to-one communication with another UE, or secure E-UTRAN access via adevice acting as a UE-to-Network Relay. The present invention may alsobe applied to establish a shared key for use by a UE which is withinnetwork coverage, but where GBA procedure is not available for someother reason or GBA Push is preferred over GBA.

As also discussed above, the device, at which the method 200 k isperformed, may be a UE, a UE-to-network Relay, or may be a network node.Furthermore, any reference herein to remote UE which is out of networkcoverage may use direct communication protocols to communicate not onlywith a dedicated UE-to-Network Relay but also with a directcommunication enabled UE which may act as a UE-to-Network Relay. It willtherefore be appreciated that while a device in the form of aUE-to-Network Relay is discussed in the following examples for thepurposes of illustration, aspects of the invention are applicable to usefor key establishment between a UE and other forms of device, forexample a device in the form of a second UE. In either case it isassumed that both the UE and the device have a UICC and are enabled forProSe.

Regardless of the nature of the device, it is possible that the UE anddevice may belong to the same Home PLMN or may belong to different HomePLMNs. Example applications of methods according to the presentinvention are described below for both these scenarios. The followingexample applications illustrate different ways in which the steps of themethods 100 k, 200 k, 300 k described above may be implemented toachieve the above discussed functionality.

EXAMPLE iii UE and Device in Same HPLMN

The GBA Push and ProSe architecture for this example are illustrated inFIGS. 8 and 9 as discussed above. According to this example, the UE,referred to as Remote UE 20 k, and the device, referred to as Relay 30k, both belong to the same Home PLMN (HPLMN). This example describes thedevice as a ProSe UE-to-Network Relay however the example is alsoapplicable to one-to-one communication. Furthermore, in the followingexamples, the DCE is a ProSe function acting as a NAF, but it will beappreciated that this is merely for the purposes of illustration. TheDCE may alternatively be a ProSe KMS or a ProSe KMF.

The Relay 30 k has E-UTRAN network coverage and is connected to thenetwork. The Relay 30 k uses ProSe Direct Discovery procedures to allowUEs in the vicinity to discover it. The Remote UE 20 k discovers theRelay 30 k using ProSe Direct Discovery procedures on the PC5 interface,for example having moved into the cell in which the Relay 30 k islocated. In some examples of the invention, discovery may be completedbefore the methods according to the present invention are carried out.In other examples, certain method steps may take place during thediscovery procedure.

Although not illustrated in FIGS. 8 and 9, the Remote UE 20 k may havereceived a bootstrapping renegotiation request in response to anoutbound direct communication set up request, and it is unable to run aGBA procedure to obtain a new shared secret and so proceeds with thefollowing steps below. Alternatively, the Remote UE 20 k proceeds withthe steps below regardless of whether it has received a bootstrappingrenegotiation request.

The Remote UE 20 k sends a UE identifier comprising any of ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to the Relay 30 k and requestsa direct communication key for use with the Relay 30 k. On receipt ofthis request, the Relay 30 k sends a request over the PC3 interface toits ProSe Function 40 k, which in the present example is the ProSeFunction in the Home PLMN of both the Remote UE 20 k and the Relay 30 k.The ProSe Function acts as a NAF 40 k for GBA Push. The ProSe Function40 k identifies the UE from the UE identifier which may be any of ProSeUE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code. Having identified the remoteUE 20 k, the ProSe Function 40 k obtains GBA Push Information (GPI) anda session shared key from the BSF 50 k in the Home PLMN. The sessionshared key is referred to in the present and following examples as aKs_NAF for the purposes of illustration. However it will be appreciatedthat the session shared key may also or alternatively comprise other NAFspecific keys such as Ks_int_NAF and Ks_ext_NAF. The ProSe Function 40 kthen derives the required direct communication key, DC_K, from thesession shared key Ks_NAF and the identity of the Relay 30 k. The ProSeFunction 40 k then sends both the GPI and the direct communication keyDC_K to the Relay 30 k. The Relay 30 k stores the direct communicationkey DC_K and forwards the GPI to the Remote UE 20 k. On receipt of theGPI, the Remote UE 20 k derives the session shared key Ks_NAF from theGPI and then derives the direct communication key DC_K from the sessionshared key Ks_NAF and the identity of the Relay 30 k. The directcommunication key DC_K is then available in both the Remote UE 20 k andthe Relay 30 k.

The above steps are described in greater detail below with reference tothe messaging flow diagram in FIG. 10.

Referring to FIG. 10, Relay 30 k initially connects to the E-UTRAN,which connection may take place at any time before the following methodsteps. The Relay 30 k establishes a secure channel over PC3 when theProSe Function (DCE) acts as NAF or over PC8 when the ProSe KMF or ProSeKMS (DCE) acts as NAF. The Remote UE 20 k may or may not then performGBA procedure with the BSF whilst in network coverage, step 1001 k. TheRemote UE 20 k and Relay 30 k then discover each other through DirectDiscovery procedures using Direct Discovery Model A or Direct DiscoveryModel B, step 1002 k.

Discovery may be initiated by either the Remote UE 20 k or the Relay 30k. In the illustrated example, discovery is initiated by the Relay 30 k.Step 1002 k comprises the Relay 30 k issuing a discovery proceduremessage, which may be a Direct Discovery broadcast according to ProSeModel A or a Direct Discovery request message according to ProSe ModelB. The discovery procedure message includes an identity of the Relay 30k. The Remote UE 20 k receives the discovery procedure message and mayrespond, for example with a discovery procedure message comprising arequest message sent in response to a Direct Discovery broadcastaccording to ProSe Model A or a Direct Discovery response message inresponse to a Direct Discovery request message according to ProSe ModelB. In the illustrated example, the discovery procedure is completedbefore the subsequent method steps. However, in alternative examples,subsequent method steps may be combined with the discovery procedure, asdiscussed below.

Although not illustrated in FIG. 10, the Remote UE 20 k may havereceived a bootstrapping renegotiation request 1001 k in response to anoutbound direct communication set up request, and it is unable to run aGBA procedure to obtain a new shared secret and so proceeds with thefollowing steps below. Alternatively, the Remote UE 20 k proceeds withthe steps below regardless of whether it has received a bootstrappingrenegotiation request.

In message 1003 k, the Remote UE 20 k sends a direct communication setup request message over PC5 to the Relay 30 k. The request includes theUE identifier comprising any of ProSe UE ID, IMSI, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode and a request for secure communication. The request may explicitlyrequest generation of a key for direct communication, or an indicationthat secure communication is required may be contained within the RemoteUE identity. In some embodiments, the request message also comprisesdirect key set identifier (DKSI) for identifying any keys resulting fromthe direct communication key, NAF-ID identifying which ProSe Function ofthe Remote UE 20 k that is acting as NAF, a list of security algorithmssupported by the Remote UE 20 k and a nonce generated by the Remote UE20 k (Nonce-UE-remote) used for authentication as seen below. A noncemay for example be a sequence number, a random value or a timestamp.

In some examples of the invention (not illustrated) the directcommunication set up request message 1003 k may be included in adiscovery procedure message such as a discovery response message asdiscussed above.

The Relay 30 k receives the request from the Remote UE 20 k and then, atstep 1004 k, the Relay sends a Retrieve ProSe Direct Key request overthe PC3 or PC8 interface to the ProSe Function 40 k acting as a NAF. Inthe present example, both the Remote UE 20 k and the Relay 30 k are inthe same PLMN and so the ProSe Function is the Home ProSe Function forthe Relay 30 k. The request to the ProSe Function includes at least theUE identifier comprising any of ProSe UE ID, IMSI, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode and the identity of the Relay 30 k and requests to provide a keyfor direct communication between the Remote UE 20 k and the Relay 30 k.

Upon receiving the request, the ProSe function 40 k checks whether ornot a UE associated with the NAF-ID is authorized to set up securecommunication over the PC5 interface by checking a database with a listof authorized identities at message exchange 1005 k. This database maybe local and supported by the DCE 40 i or may be implemented in adifferent network server. If the authorization is successful, the ProSeFunction 40 k identifies the Remote UE 20 k based on any of ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code, step 1007 k. If the UE isidentified, the ProSe Function 40 k translates or maps the ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to an appropriate public useridentity if needed.

Identifying the UE in step 1007 k may comprise the following steps; ifthe ProSe UE ID is used as a UE identifier, then the ProSE UE ID is alsopreviously stored in the ProSe Function 40 k such that the ProSefunction 40 k can match the received ProSe UE ID with one of its storedProSe UE IDs. If the IMSI or MSISDN is used as a UE identifier, theProSe Function may check one of its stored lists for a match oralternatively it may contact another server such as the HSS 60 k toidentify the UE.

Once the Remote UE 20 k is identified, the ProSe Function 40 k alsochecks if the Remote UE 20 k is authorized to set-up security over PC5with a UE belonging to the same HPLMN as the Relay 30 k.

When the Remote UE 20 k has been successfully authorized, the BSF 50 kcontacts the HSS 60 k to fetch appropriate authentication vectors andGBA User Security Settings (GUSS) according to TS 33.223, this is alsorepresented by step 1007 k in FIG. 10. The BSF 50 k prepares the GPI andsession shared key Ks_NAF according to the GBA push procedures definedin TS 33.223 and sends the GPI and Ks_NAF to the ProSe Function 40 k.

Upon receiving the GPI and Ks_NAF, the ProSe Function 40 k derives thedirect communication key DC_K to be provisioned to the Relay 30 k. TheProSe Function 40 k may further derive a lifetime for the directcommunication key. The ProSe Function 40 k calculates the directcommunication key DC_K at message exchange 1011 k from the sessionshared key Ks_NAF and the Relay 30 k identity as follows:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF (session shared key) and the Relay 30 k identity.Additional inputs may be included such as the Remote UE identity, andprocessing of the inputs before inputting to the KDF may take place.

In message 1013 k, the ProSe Function sends a retrieve ProSe direct keyresponse comprising the GPI and the direct communication key DC_K to theRelay 30 k over the PC3 interface. The ProSe Function 40 k may also sendthe lifetime of the direct communication key if generated in messageexchange 1011 k.

The Relay 30 k stores the direct communication key DC_K and sends adirect security mode command message to the Remote UE 20 k over PC5,message 1014 k. This message comprises at least the GPI and the identityof the Relay 30 k. In a preceding message exchange 1013 bk the Relay mayalso generate a session key (SK) from the direct communication key DC_K,Nonce-UE-remote and a nonce generated by the Relay 30 k (Nonce-UE-relay)as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )

The Relay 30 k may then further generate confidentiality key CK andintegrity key IK from session key KS and store them together with theDKSI and the lifetime in message exchange 1013 bk. The confidentialitykey CK and the integrity key IK may be calculated as follows;

-   -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In this case, the direct security mode command message 1014 k mayfurther comprise the DKSI, lifetime, security algorithms chosen from thelist of security algorithms received from the Remote UE 20 k, the listof security algorithms initially received from the Remote UE 20 k, andNonce-UE-remote. In the illustrated example, the message also contains aMessage Authentication Code (MAC). The method 200 k performed at theRelay may thus further comprise a step of generating a MAC using theintegrity key. In an alternative embodiment, the MAC is generated usingthe direct communication key or another key derived from the directcommunication key.

Having received the GPI and Relay 30 k identity and optionally the DKSI,lifetime, security algorithms chosen by the Relay 30 k from the list ofsecurity algorithms supported by the Remote UE 20 k, the list ofsecurity algorithms itself, and Nonce-UE-remote protected by the MAC,the Remote UE 20 k derives the direct communication key DC_K in messageexchange 1015 k. This comprises processing the GPI to obtain the sessionshared key Ks_NAF before then deriving the direct communication key DC_Kfrom the session shared key Ks_NAF and the Relay 30 k identity in asimilar manner to the ProSe Function 40 k. The Remote UE 20 k thuscalculates the direct communication key according to:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF and Relay ID. Additional inputs may be included, andprocessing of the inputs before inputting to the KDF may take place.

The Remote UE 20 k further derives session key (SK) from the directcommunication, Nonce-UE-remote and Nonce-UE-relay, and confidentialityand integrity keys from session key KS, similarly to the Relay 30 k.Again, additional inputs may be included, and processing of the inputsbefore inputting to the KDF may take place. The Remote UE 20 k thuscalculate the session key SK and the confidentiality key CK andintegrity key IK as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )    -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In message exchange 1015 k, the Remote UE 20 k checks the MAC receivedfrom the Relay 30 k in the direct security mode command message 1014 k.If the MAC was generated using the integrity key IK, then the MAC may bechecked by the Remote UE 20 k using the integrity key IK which theRemote UE 20 k has just derived. If the MAC was generated using adifferent key, for example the key direct communication key DC_K, thenthat key may be used to check the MAC. If the check is successful, thenthe Remote UE 20 k responds with a direct security mode complete message(or a confirmation message) to the Relay 30 k indicating that the checkwas successful and protects the response message with a MAC usingintegrity key IK, message exchange 1016 k.

Although not illustrated in FIG. 10, the Relay 30 k checks the MACreceived in message 1016 k using integrity key IK. If the check issuccessful, then the Relay 30 k knows that the Remote UE 20 k shares thesame direct communication key DC_K as the Relay 30 k. The Relay 30 k cannow use the direct communication key DC_K for direct communication onthe PC5 interface with the Remote UE 20 k.

As described above Nonce-UE-remote and Nonce-UE-relay are included ingeneration of the session key KS. The Nonce-UE-remote and Nonce-UE-relayare generated by the Remote UE 20 k and the Relay 30 k, respectively,and are used for mutual authentication. A nonce may for example be asequence number, a random value or a timestamp. As the MACs describedabove are generated using integrity key IK based on at least theNonce-UE-remote and Nonce-UE-relay, in practice this means that RemoteUE 20 k and the Relay 30 k authenticate one another.

EXAMPLES iv UE and Device in Different HPLMNs

This embodiment is similar to that wherein the UE and Device belong tothe same HPLMN, however additional messages are exchanged between theDCE of the Remote E and the Relay. The DCE 40Am of the Remote UE and theDCE 40Bm of the Relay may comprise a ProSe function, a ProSe KMS orProSe KMF of the relevant PLMN. The DCE 40Am of the Remote UE acts as aNAF. In the following examples, the DCE is a ProSe function, but it willbe appreciated that this is merely for the purposes of illustration. Insome examples, the DCE may comprise a ProSe Function in each of thePLMNs, each Function or server acting as a sub-Element of the DirectCommunication Element. For example, a ProSe Function in the Remote UEPLMN may act as a NAF for the bootstrapping procedure, as a firstsub-Element, with a ProSe Function in the device PLMN deliveringmessages to and from the Relay, as a second sub-Element. Each ProSeFunction may also authorize the entity (Remote UE or Relay) in its ownPLMN.

The ProSe architecture for Example iv is also illustrated in FIG. 11.The PLMN of the UE 20 m (Remote UE) is designated as PLMN A, with BSF50Am and ProSe Function 40Am, which acts as NAF 40Am. The PLMN of thedevice 30 m (Relay) is designated as PLMN B. The DCE comprises twosub-Elements: the Home ProSe Function 40Am of PLMN A, which acts as NAF40Am, and the Home ProSe Function 40Bm of PLMN B, which acts as a relayand shares the process of authorisation. The BSF of PLMN B is notinvolved in the following examples, as the GPI and session shared keyare provided by the BSF of the UE Home PLMN, BSF 50Am.

This example is also similar to example iii described above, with theexception that the ProSe Functions of two PLMNs are involved. The ProseFunction of the UE acts as the NAF for GBA Push and the ProSe Functionof the device acts as a proxy conveying messages and also contributes tothe authorisation process.

The GBA Push architecture for this example is also illustrated in FIG.12. According to this example, the UE, referred to as Remote UE 20 m,and the device, referred to as Relay 30 m, belong to different HomePLMNs. The Relay 30 m has E-UTRAN network coverage and is connected tothe network.

The Relay 30 m is using ProSe Direct Discovery procedures to allow UEsin the vicinity to discover it. The Remote UE 20 m discovers the Relay30 m using ProSe Direct Discovery procedures on the PC5 interface, forexample having moved into the cell in which the Relay 30 m is located.In some examples of the invention, discovery may be completed before themethods according to the present invention are carried out. In otherexamples, certain method steps may take place during the discoveryprocedure.

Although not illustrated in FIG. 12, the Remote UE 20 m may havereceived a bootstrapping renegotiation request in response to anoutbound direct communication set up request, and it is unable to run aGBA procedure to obtain a new shared secret and so proceeds with thefollowing steps below. Alternatively, the Remote UE 20 k proceeds withthe steps below regardless of whether it has received a bootstrappingrenegotiation request.

The Remote UE 20 m sends a UE identifier comprising any of ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to the Relay 30 m and requestsa direct communication key for use with the Relay 30 m. On receipt ofthis request, the Relay 30 m sends a request over the PC3 interface toits own ProSe Function 40Bm, which is a sub-Element of the DCE 40 inthis example. The Relay Home ProSe Function 40Bm passes the request tothe ProSe Function in the PLMN of the Remote UE 40Am, which in thepresent example acts as a NAF 40Am for GBA Push. The ProSe Function 40Amidentifies the UE from the UE identifier which may be any of ProSe UEID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code. Having identified the remoteUE 20 m, the NAF 40Am obtains GBA Push Information (GPI) and a sessionshared key from the BSF 50Am in the Home PLMN of the Remote UE 20 m. TheNAF 40Am then derives the required direct communication key, DC_K, fromthe session shared key Ks_NAF and the identity of the Relay 30 m. TheNAF 40Am then sends both the GPI and the direct communication key DC_Kto the Home ProSe Function 40Bm of the Relay 30 m, which forwards theGPI and the direct communication key DC_K to the Relay 30 m. The Relay30 m stores the direct communication key DC_K and forwards the GPI tothe Remote UE 20 m. On receipt of the GPI, the Remote UE 20 m derivesthe session shared key Ks_NAF from the GPI and then derives the directcommunication key DC_K from the session shared key Ks_NAF and theidentity of the Relay 30 m. The direct communication key DC_K is thenavailable in both the Remote UE 20 m and the Relay 30 m.

The above steps are described in greater detail below with reference tothe messaging flow diagram in FIG. 13.

Referring to FIG. 13, Relay 30 m initially connects to the E-UTRAN,which connection may take place at any time before the following methodsteps. The Relay 30 m establishes a secure channel over PC3 when theProSe Function (DCE) acts as NAF or over PC8 when the ProSe KMF or ProSeKMS (DCE) acts as NAF. The Remote UE 20 m may or may not then performGBA procedure with BSF whilst in network coverage, message exchange 1301m.

The Remote UE 20 m and Relay 30 m then discover each other throughDirect Discovery procedures using Direct Discovery Model A or DirectDiscovery Model B, message exchange 1302 m.

Discovery may be initiated by either the Remote UE 20 m or the Relay 30m. In the illustrated example, discovery is initiated by the Relay 30 m.Step 1302 m comprises the Relay 30 m issuing a discovery proceduremessage, which may be a Direct Discovery broadcast according to ProSeModel A or a Direct Discovery request message according to ProSe ModelB. The discovery procedure message includes an identity of the Relay 30m. The Remote UE 20 m receives the discovery procedure message and mayrespond, for example with a discovery procedure message comprising arequest message sent in response to a Direct Discovery broadcastaccording to ProSe Model A or a Direct Discovery response message sentin response to a Direct Discovery request message according to ProSeModel B. In the illustrated example, the discovery procedure iscompleted before the subsequent method steps. However, in alternativeexamples, subsequent method steps may be combined with the discoveryprocedure, as discussed below.

Although not illustrated in FIG. 13, the Remote UE 20 m may havereceived a bootstrapping renegotiation request in response to anoutbound direct communication set up request, and it is unable to run aGBA procedure to obtain a new shared secret and so proceeds with thefollowing steps below. Alternatively, the Remote UE 20 m proceeds withthe steps below regardless of whether it has received a bootstrappingrenegotiation request.

In step 1303 m, the Remote UE 20 m sends a direct communication set uprequest message over PC5 to the Relay 30 m. The request includes a UEidentifier comprising any one of ProSe UE ID, IMSI, MSISDN, ProSe RelayUE ID, ProSe Discovery UE ID, ProSe Application code or ProSe Restrictedcode and a request for secure communication. The request may explicitlyrequest generation of a key for direct communication, or an indicationthat secure communication is required may be contained within the RemoteUE identity. In some embodiments, the request message also comprisesdirect key set identifier (DKSI) for identifying any keys resulting fromthe direct communication key, NAF-ID identifying which ProSe Function ofthe Remote UE 20 m that is acting as NAF, a list of security algorithmssupported by the Remote UE 20 m and a nonce generated by the Remote UE20 m (Nonce-UE-remote) used for authentication as seen below. A noncemay for example be a sequence number, a random value or a timestamp.

In some examples of the invention (not illustrated) the directcommunication set up request message 1303 m may be included in adiscovery response message as discussed above.

The Relay 30 m receives the request from the Remote UE 20 m and then, atstep 1304 m, the Relay sends a Retrieve ProSe Direct Key request overthe PC3 interface to the ProSe Function 40Bm of the Relay. The requestincludes the UE identifier and the identity of the Relay 30 m andrequests the ProSe Function to provide a key for direct communicationbetween the Remote UE 20 m and the Relay 30 m.

Upon receiving the request, the ProSe Function 40Bm first checks whetheror not a UE associated with the NAF-ID is authorized to set up securecommunication over the PC5 interface by checking a database with a listof authorized identities at message exchange 1305 m. This database maybe local and supported by the ProSe Function 40Bii or may be implementedin a different network server. If the authorization is successful, theProSe Function 40Bm of the Relay 30 m sends a ProSe key request over PC6to ProSe Function 40Am of Remote UE 20 m, message 1306 m. The requestincludes the UE identifier received from the Remote UE 20 m and Relayidentifier (Relay ID).

Upon receiving the request from the ProSe Function 40Bm of the Relay,the ProSe Function 40 m identifies the Remote UE 20 m based on any ofProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code, step 1007 m. If the UEis identified, the ProSe Function 40 m translates or maps the ProSe UEID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to an appropriate public useridentity if needed.

Identifying the UE in step 1007 m may comprise the following steps; ifthe ProSe UE ID is used as a UE identifier, then the ProSE UE ID is alsopreviously stored in the ProSe Function 40Am such that the ProSefunction 40Am can match the received ProSe UE ID with one of its storedProSe UE IDs. If the IMSI or MSISDN is used as a UE identifier, theProSe Function may check one of its stored lists for a match oralternatively it may contact another server such as the HSS 60 m toidentify the UE.

Once the Remote UE 20 m is identified, the ProSe Function 40Am of theRemote UE also checks if the Remote UE 20 m is authorized to set-upsecurity over PC5 with a UE belonging to the same HPLMN as the Relay 30m.

When the Remote UE 20 m has been successfully authorized, the BSF 50Amcontacts the HSS 60Am of the same HPLMN as the Remote UE to fetchappropriate authentication vectors and GBA User Security Settings (GUSS)according to TS 33.223, this is also represented by step 1307 m in FIG.13. The BSF 50Am prepares the GPI and session shared key Ks_NAFaccording to the GBA push procedures defined in TS 33.223 and sends theGPI and Ks_NAF to the ProSe Function 40Am.

Upon receiving the GPI and Ks_NAF, the ProSe Function 40Am derives thedirect communication key DC_K to be provisioned to the Relay 30 m. TheProSe Function 40Am may further derive a lifetime for the directcommunication key. The ProSe Function 40Am calculates the directcommunication key DC_K at message exchange 1311 m from the sessionshared key Ks_NAF and the Relay 30 m identity as follows:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF (session shared key) and the Relay 30 m identity.Additional inputs may be included such as the Remote UE identity, andprocessing of the inputs before inputting to the KDF may take place.

The ProSe Function 40Am then sends the direct communication key DC_K,GPI, and the lifetime if generated, to the ProSe Function 40Bm of theRelay in a ProSe key response over PC6 interface, message 1312 m.

In message 1313 m, the ProSe Function 40B sends a retrieve ProSe directkey response comprising the GPI and the direct communication key DC_K tothe Relay 30 m over the PC3 interface. The ProSe Function 40Bm may alsosend the lifetime of the direct communication key if generated inmessage exchange 1311 m.

The Relay 30 m stores the direct communication key DC_K and sends adirect security mode command message to the Remote UE 20 m over PC5,message 1314 m. This message comprises at least the GPI and the identityof the Relay 30 m. In a preceding message exchange 1313 bm the Relay mayalso generate a session key (SK) from the direct communication key DC_K,Nonce-UE-remote and a nonce generated by the Relay 30 m (Nonce-UE-relay)as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )

The Relay 30 m may then further generate confidentiality key CK andintegrity key IK from session key KS and store them together with theDKSI and lifetime in message exchange 1313 bm. The confidentiality keyCK and the integrity key IK may be calculated as follows;

-   -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In this case, the direct security mode command message 1314 m mayfurther comprise the DKSI, lifetime, security algorithms chosen from thelist of security algorithms received from the Remote UE 20 m, the listof security algorithms initially received from the Remote UE 20 m, andNonce-UE-remote. In the illustrated example, the message also contains aMessage Authentication Code (MAC). The method 200 m performed at theRelay may thus further comprise a step of generating a MAC using theintegrity key. In an alternative embodiment, the MAC is generated usingthe direct communication key or another key derived from the directcommunication key.

Having received the GPI and Relay 30 m identity and optionally the DKSI,lifetime, security algorithms chosen from the list of securityalgorithms supported by the Remote UE 20 m, the list of securityalgorithms itself, and Nonce-UE-remote protected by the MAC, the RemoteUE 20 m derives the direct communication key DC_K in message exchange1315 m. This comprises processing the GPI to obtain the session sharedkey Ks_NAF before then deriving the direct communication key DC_K fromthe session shared key Ks_NAF and the Relay 30 m identity in a similarmanner to the ProSe Function 40Am. The Remote UE 20 m thus calculatesthe direct communication key according to:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF and Relay ID. Additional inputs may be included, andprocessing of the inputs before inputting to the KDF may take place.

The Remote UE 20 m further derives session key (SK) from the directcommunication, Nonce-UE-remote and Nonce-UE-relay, and confidentialityand integrity keys from session key KS, similarly to the Relay 30 m.Again, additional inputs may be included, and processing of the inputsbefore inputting to the KDF may take place. The Remote UE 20 m thuscalculate the session key SK and the confidentiality key CK andintegrity key IK as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )    -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In message exchange 1315 m, the Remote UE 20 m checks the MAC receivedfrom the Relay 30 m in the direct security mode command message 1314 m.If the MAC was generated using the integrity key IK, then the MAC may bechecked by the Remote UE 20 m using the integrity key IK which theRemote UE 20 i has just derived. If the MAC was generated using adifferent key, for example the key direct communication key DC_K, thenthat key may be used to check the MAC. If the check is successful, thenthe Remote UE 20 m responds with a direct security mode complete message(or a confirmation message) to the Relay 30 m indicating that the checkwas successful and protects the response message with a MAC usingintegrity key IK, message exchange 1316 m.

Although not illustrated in FIG. 10, the Relay 30 m checks the MACreceived in message 1316 m using integrity key IK. If the check issuccessful, then the Relay 30 m knows that the Remote UE 20 m shares thesame direct communication key DC_K as the Relay 30 m. The Relay 30 m cannow use the direct communication key DC_K for direct communication onthe PC5 interface with the Remote UE 20 m.

As described in previous examples, Nonce-UE-remote and Nonce-UE-relaymay be included in generation of the session key KS. The Nonce-UE-remoteand Nonce-UE-relay are generated by the Remote UE 20 m and the Relay 30m, respectively, and are used for mutual authentication. A nonce may forexample be a sequence number, a random value or a timestamp. As the MACsdescribed above are generated using integrity key IK based on at leastthe Nonce-UE-remote and Nonce-UE-relay, in practice this means thatRemote UE 20 m and the Relay 30 m authenticate one another.

As described above, the ProSe Function 50Am of the Remote UE acts as aNAF, however it should be understood that it is also in the scope of thepresent invention for the ProSe Function 50Bm of the Relay 30 m to actas the NAF instead of the ProSe Function 50Aii of the Remote UE.

Another aspect of the invention will now be described. Similarly to theembodiments described above, also this aspect of the present inventionemploy the parts of the reference GBA Push architecture, namely a BSF,to establish a shared key between a UE and a device, which key may beused over a direct communication interface such as a ProSe PC5interface. In this case, the GBA Push is employed as a fall back optionwhen the UE does not have a valid shared secret for establishing ashared key and the UE cannot fetch a new key from its ProSe KeyManagement Function (KMF) because the UE is out of network coverage.

This embodiment employs the security set-up for UE-Network Relay asdescribed in SA3 TR 33.833 in section 8.1.7. In this embodiment the UEalso uses ProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe DiscoveryUE ID, ProSe Application code or ProSe Restricted code as a UEidentifier in order to establish a shared key between a remote UE 20 nand a device, Relay 30 n, which key may be used over a directcommunication interface such as a ProSe PC5 interface.

In brief, in this embodiment the UE fetches a ProSe User Relay Key(PRUK) from its KMF (also corresponding to a direct communicationelement) and associated PRUK ID (key ID). The KMF acts as a NAF and mayalso be a ProSe Function or KMS. The UE 20 n and a Relay 30 n theninitiate a discovery procedure. The Remote UE 20 n then contacts theRelay 30 n indicating the PRUK ID. The Relay 30 n forwards the requestto the KMF 40 n and its Relay ID to the KMF. If the KMF 40 n does notrecognize the PRUK ID, it sends an error message to the UE 20 n via theRelay 30 n. The Remote UE 20 n tries to retrieve a new PRUK however ifit is out of network coverage or cannot contact the KMF for any otherreason, the Remote UK 20 n sends a UE identifier comprising any of ProSeUE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to the Relay 30 n which theRelay forwards, together with its Relay ID, to the KMF in order to fetcha ProSe Relay Key. When the KMF 40 n receives the UE identifier itidentifies the UE 20 n and then fetches GPI and a session shared key(NAF key which may be Ks_NAF, Ks_int_NAF or Ks_ext_NAF) from a BSF. Thenthe KMF 40 n derives a ProSe Relay Key or a direct communication keyDC_K using the session shared key and the Relay ID as input. The KMF 40n then sends the direct communication key DCD_K and GPI to the Relay 30n. The Relay 30 n then sends the GPI to and the Relay ID to the UE. TheUE derives the session shared key (NAF key which may be Ks_NAF,Ks_int_NAF or Ks_ext_NAF), and then derives the direct communication keyfrom the session shared key and the Relay ID. The Direct Communicationkey K_DC is then available in both the UE and the device for use on adirect communication interface such as the ProSe PC5 interface betweenthe UE and the device.

Similar to the above, the KMF 40 n involved in the provisioning of theDirect Communication key may be operated by a 3GPP operator or a thirdparty operator, for example a National Security or Public Safetyorganisation having an agreement with the 3GPP operator running the BSF.The device with which the UE communicates may be another UE forone-to-one communication or may be a UE-to-Network Relay.

The following discussion illustrates further examples of the inventionwith reference to ProSe communication as supported by a 3GPP network.However it will be appreciated that the invention is equally applicableto other direct communication technologies.

As previously discussed, aspects of the invention are particularlysuited to establishing a shared key for use by a UE and a device overthe PC5 interface. This is achieved using ProSe UE ID, IMSI, MSISDN,ProSe Relay UE ID, ProSe Discovery UE ID, ProSe Application code orProSe Restricted code as a UE identifier and this may be employed whenthe UE cannot fetch a new valid PRUK, for example when the UE is out ofnetwork coverage. However it should be understood that the UE 20 may notbe limited to a remote UE that is out of network coverage that wishes tosecure one-to-one communication with another UE, or secure E-UTRANaccess via a device acting as a UE-to-Network Relay. The presentinvention may also be applied to establish a shared key for use by a UEwhich is within network coverage, but a PRUK cannot be fetched from theKMF 40 n for a reason or another.

It is possible that the UE and device may belong to the same Home PLMNor may belong to different Home PLMNs. Example applications of methodsaccording to the present invention are described below where the UE andthe device belong to the same Home PLMN, however it should be understoodthat it is also applicable when the UE and device belong to differentHome PLMN. The following example applications illustrate different waysin which the steps of the methods 100 k, 200 k, 300 k described abovemay be implemented to achieve the above discussed functionality.

Referring to FIG. 17, a detail description of the message flow will bedescribed. The Remote UE 20 n and the Relay 30 n initially connect tothe E-UTRAN, which connection may take place at any time before thefollowing method steps. The Relay 30 m establishes a secure channel withthe KMF (DCE) which has functionalities of a NAF. The Remote UE 20 nthen contacts the KMF 40 n requesting PRUK, direct communication keyDC_K, and the KMF 40 n sends the PRUK and the PRUK ID to the Remote UE20 n, message exchange 1701.

The Remote UE 20 n and Relay 30 n then discover each other throughDirect Discovery procedures using Direct Discovery Model A or DirectDiscovery Model B, message exchange 1702 as described in TR 23.713[33].In one embodiment, discovery may be initiated by either the Remote UE 20n or the Relay 30 n. In the illustrated example, discovery may beinitiated by the Relay 30 n. Thus, step 1702 comprises the Relay 30 nissuing a discovery procedure message, which may be a Direct Discoverybroadcast according to ProSe Model A or a Direct Discovery requestmessage according to ProSe Model B. The discovery procedure messageincludes an identity of the Relay 30 n. The Remote UE 20 n receives thediscovery procedure message and may respond, for example with adiscovery procedure message comprising a request message sent inresponse to a Direct Discovery broadcast according to ProSe Model A or aDirect Discovery response message sent in response to a Direct Discoveryrequest message according to ProSe Model B. In the illustrated example,the discovery procedure is completed before the subsequent method steps.However, in alternative examples, subsequent method steps may becombined with the discovery procedure, as discussed below.

In step 1703, the Remote UE 20 m sends a direct communication requestmessage to the Relay 30 m. The message comprises the PRUK ID or thePRUK, a nonce generated by the UE (Nonce-remote-UE_(—) and a DKSI (thisgives the values of the Key Set Identifier for a security contextcreated from the PRUK). The Relay 30 m in turn sends the received PRUKID and its Relay ID to the KMF 40 n, step 1704.

(In some examples of the invention (not illustrated) the directcommunication request message 1703, 1707 may be included in a discoveryprocedure message such as a discovery response message as discussedabove.)

If the KMF 40 n does not recognize the PRUK ID, it sends an errormessage to the Relay 30 n indicating that the PRUK ID is unknown, step1705 a. The Relay 30 n forwards the message to the Remote UE 20 n instep 1705 b. When the Remote UE 20 n receives the error message, ittries to fetch a new PRUK from the KMF 40 n, if unsuccessful (e.g. theUE is out of network coverage), the Remote UE 20 n sends a directcommunication request with a UE identifier comprising any one of itsProSe UE ID, IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code to the Relay 30 n. Thusthe Remote UE 20 n does not send a PRUK ID, message 1707.

Upon receiving the direct communication request comprising the UEidentifier, the Relay 30 n sends a request to the KMF for the directcommunication key, the request comprising the UE identifier and therelay ID, step 1708.

The KMF then identifies the Remote UE 20 n based on any of ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code used as a UE identifier. Ifthe UE is identified, the KMF 40 n translates or maps the ProSe UE ID,IMSI, MSISDN, ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code to an appropriate public useridentity if needed.

Identifying the Remote UE 20 n may comprise the following steps; if theProSe UE ID is used as a UE identifier, then the ProSe UE ID is alsopreviously stored in the KMF 40 n such that the KMF 40 n can match thereceived ProSe UE ID with one of its stored ProSe UE IDs. If the IMSI orMSISDN is used as a UE identifier, the ProSe Function may check one ofits stored lists for a match or alternatively it may contact anotherserver such as a HSS to identify the UE.

In the next step 1709, the KMF 40 n checks if the Relay 30 n isauthorized to server the Remote UE by checking a database with a list ofauthorized. This database may be local and supported by the KMF 40 n ormay be implemented in a different network server. If the authorizationis successful, the KMF 40 n sends a request to a BSF 50 n requesting GPIand a session shared key (referred herein as Ks_NAF but can also be amore specific NAF key for example Ks_ext_NAF or Ks_int_NAF). The BSF 50n contacts a HSS (not shown) to fetch appropriate authentication vectorsand GBA User Security Settings (GUSS) according to TS 33.223. The BSF 50n prepares the GPI and session shared key according to the GBA pushprocedures defined in TS 33.223 and sends the GPI and session shared keyto the KMF 40 n, step 1709.

Upon receiving the GPI and session shared key Ks_NAF, the KMF 40 nderives the direct communication key DC_K to be provisioned to the Relay30 n. The KMF 40 n calculates the direct communication key DC_K from thesession shared key Ks_NAF and the Relay 30 n identity (Relay ID) asfollows:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF (session shared key) and the Relay 30 n identity.Additional inputs may be included such as the Remote UE identity, andprocessing of the inputs before inputting to the KDF may take place.

The KMF 40 n then sends the direct communication key DC_K, and GPI tothe Relay 30 n in a ProSe key response over PC6 interface, message 1710.

The Relay 30 n stores the direct communication key DC_K and sends adirect security mode command message to the Remote UE 20 m over PC5,message 1712. This message comprises at least the GPI and the identityof the Relay 30 n. In a preceding message exchange 1711 the Relay mayalso generate a session key (SK) from the direct communication key DC_K,Nonce-UE-remote and a nonce generated by the Relay 30 m (Nonce-UE-relay)as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )

The Relay 30 m may then further generate confidentiality key CK andintegrity key IK from session key KS and store them together with theDKSI in message exchange 1711. The confidentiality key CK and theintegrity key IK may be calculated as follows;

-   -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In this case, the direct security mode command message 1712 may inaddition to the GPI and Relay ID further comprise the DKSI received instep 1707, and Nonce-UE-relay. In the illustrated example, the messageis protected using the integrity key, for example by using a MessageAuthentication Code (MAC). The method 200 n performed at the Relay maythus further comprise a step of generating a MAC using the integritykey. In an alternative embodiment, the MAC is generated using the directcommunication key or another key derived from the direct communicationkey.

Having received the GPI and Relay 30 n identity and optionally the DKSI,and Nonce-UE-remote protected by the integrity key, the Remote UE 20 nderives the direct communication key DC_K in message exchange 1713. Thiscomprises processing the GPI to obtain the session shared key Ks_NAFbefore then deriving the direct communication key DC_K from the sessionshared key Ks_NAF and the Relay 30 n identity in a similar manner to theKMF 40 n. The Remote UE 20 n thus calculates the direct communicationkey according to:

-   -   DC_K=KDF(Ks_NAF, Relay ID, . . . )

As discussed above, KDF is a key derivation function having as inputs atleast Ks_NAF and Relay ID. Additional inputs may be included, andprocessing of the inputs before inputting to the KDF may take place.

The Remote UE 20 n further derives session key (SK) from the directcommunication, Nonce-UE-remote and Nonce-UE-relay, and confidentialityand integrity keys from session key KS, similarly to the Relay 30 n.Again, additional inputs may be included, and processing of the inputsbefore inputting to the KDF may take place. The Remote UE 20 n thuscalculate the session key SK and the confidentiality key CK andintegrity key IK as follows;

-   -   SK=KDF(DC_K, Nonce-UE-remote, Nonce-UE-relay, . . . )    -   CK=KDF(SK, . . . )    -   IK=KDF(SK, . . . )

In message exchange 1713, the Remote UE 20 m checks the integrity of thedirect security mode command message by for example by using integrityalgorithm indicated in the message and the integrity key. Alternatively,if a MAC was used the Remote UE checks the MAC received from the Relay30 n together with said message. If the MAC was generated using theintegrity key IK, then the MAC may be checked by the Remote UE 20 nusing the integrity key IK which the Remote UE 20 n has just derived. Ifthe MAC was generated using a different key, for example the key directcommunication key DC_K, then that key may be used to check the MAC.

If the check is successful, then the Remote UE 20 n responds with adirect security mode complete message (or a confirmation message) to theRelay 30 m indicating that the check was successful and protects theresponse message with the integrity key or a MAC using integrity key IK,message exchange 1714.

Although not illustrated in FIG. 17, the Relay 30 n checks the integrityor the MAC received in message 1714. If the check is successful, thenthe Relay 30 n knows that the Remote UE 20 n shares the same directcommunication key DC_K as the Relay 30 m. The Relay 30 b can now use thedirect communication key DC_K for direct communication on the PC5interface with the Remote UE 20 n.

As described in previous examples, Nonce-UE-remote and Nonce-UE-relaymay be included in generation of the session key KS. The Nonce-UE-remoteand Nonce-UE-relay are generated by the Remote UE 20 n and the Relay 30n, respectively, and are used for mutual authentication. A nonce may forexample be a sequence number, a random value or a timestamp. As the MACsdescribed above are generated using integrity key IK based on at leastthe Nonce-UE-remote and Nonce-UE-relay, in practice this means thatRemote UE 20 n and the Relay 30 n authenticate one another.

The methods of the present invention, as illustrated by the aboveexamples, may be conducted in a UE, a device which may be a UE, aUE-to-network Relay, or a network node such, or a Direct CommunicationElement (DCE) such as a ProSe Function, a ProSe KMF or a KMS. Themethods may be conducted on receipt of suitable computer readableinstructions, which may be embodied within a computer program running onthe UE, device or DCE. FIGS. 18 to 20 illustrate first examples of a UE,device and DCE which may execute the methods of the present invention,for example on receipt of suitable instructions from a computer program.Referring to FIGS. 18 to 20, each of the UE 1800, device 1900 and DCE2000 comprises a processor 1802, 1902, 2002 and a memory 1804, 1904,2004. The memory 1804, 1904, 2004 contains instructions executable bythe processor 1802, 1902, 2002 such that the UE 1800 is operative tocarry out the method 100 and 100 k, the device 1900 is operative tocarry out the method 200 and 200 k and the DCE 2000 is operative tocarry out the method 300 and 300 k.

FIG. 21 illustrates functional units in another embodiment of UE 2100which may execute the method 100, for example according to computerreadable instructions received from a computer program. It will beunderstood that the units illustrated in FIG. 21 are softwareimplemented functional units, and may be realised in any appropriatecombination of software modules.

Referring to FIG. 21, the UE 2100 comprises storage means for storing atransaction identifier obtained from a previous GBA, communication means2102 for sending to the transaction identifier and requesting keygeneration for direct communication with the device. If the transactionidentifier is invalid, the communication means 2102 also comprises meansfor receiving from the device a device identifier and key generationinformation. The UE 2100 also comprises key means 2103 for deriving asession shared key from at least the key generation information and forderiving a direct communication key from at least the session shared keyand the identifier of the device.

The communication means 2102 may further comprise means for sending tothe device direct communication element identifier, direct key setidentifier, DKSI, a list of security algorithms supported by the UE, anda nonce generated by the UE. The communication means 2102 may alsocomprise means for receiving a Message Authentication Code (MAC). Thecommunication means 2102 may further comprise means for receiving theDKSI, a lifetime, at least one security algorithm chosen by the devicefrom the list of security algorithms previously sent, said list ofsecurity algorithms supported by the UE and a nonce generated by thedevice. The communication means 2102 may additionally comprise means forsending a confirmation message to the device indicating that the UE 2100has derived the direct communication key.

The key means 2103 may further comprise means for checking the MACreceived from the device using the derived direct communication key or akey derived from the direct communication key and for generating aconfirmation MAC using the direct communication key or a key derivedfrom the direct communication key. The communication means 2102 mayfurther comprise means for sending the confirmation MAC with theconfirmation message; wherein, if the check is successful, the firstconfirmation message further indicates that the UE has successfullychecked the MAC

The UE 2100 may further comprise discovery means 2104 for discoveringthe device through a discovery procedure. The communication means 2102may comprise means for receiving a discovery procedure messagecomprising a discovery message from the device and for passing themessage to the discovery means 2104, the discovery message including theidentifier of the device. The communication means 2102 may also comprisemeans for sending a discovery procedure message comprising a discoveryresponse message responding to the received discovery message, thediscovery response message including the transaction identifier and therequest for key generation for direct communication and being assembledby the discovery means 2104.

Additionally, the invalid transaction identifier may be used as anidentifier of the UE. The interface may comprise a proximity Service,ProSe Service, interface.

Furthermore, the UE may not be able to initiate another GBAbootstrapping procedure. In one embodiment, the UE does not comprise avalid shared secret with a Bootstrapping Server Function (BSF).

The device may comprise a UE or a UE-to-Network Relay and the keygeneration information may comprise Generic Bootstrapping ArchitecturePush Information, GPI.

In one example, the storage means 2101, the communication means 2102,key means 2103 and discovery means 2104 may be implemented with helpfrom a computer program which, when run on a processor, causes thestorage means 2101, communication means 2102, key means 2103 anddiscovery means 2104 to cooperate to carry out examples of the method100 as described above.

FIG. 22 illustrates functional units in another embodiment of device2200 which may execute the method 200 of the present invention, forexample according to computer readable instructions received from acomputer program. It will be understood that the units illustrated inFIG. 20 are software implemented functional units, and may be realisedin any appropriate combination of software modules.

Referring to FIG. 22, the device 2200 comprises communication means 2202for receiving from an invalid transaction identifier of the UE and arequest for key generation for direct communication with the device. Thecommunication means 2202 also comprise means for sending to a DirectCommunication Element the transaction identifier and a deviceidentifier, and for requesting the Direct Communication Element toprovide the device with a direct communication key. The communicationmeans 2202 also comprise means for receiving from the DirectCommunication Element the direct communication key and key generationinformation, and for sending the key generation information and thedevice identifier to the UE. The device may also comprise key means 2203for storing the direct communication key.

The communication means 2202 may further comprise means for receivingfrom the UE a direct communication element identifier, a direct key setidentifier, DKSI, a list of security algorithms supported by the UE anda nonce generated by the UE. The communication means 2202 mayadditionally comprise means for sending DKSI, a lifetime, at least onesecurity algorithm chosen from the list of security algorithms supportedby the UE, said list of security algorithms supported by the UE and anonce generated by the device.

The key means 2203 may further comprise means for generating a MessageAuthentication Code, MAC, using the direct communication key or a keyderived from the direct communication key and the communication means2202 may further comprise means for sending the MAC to the UE with thekey generation information and the device identifier. The communicationmeans 2202 may further comprise means for receiving a confirmationmessage from the UE indicating that the UE has derived the directcommunication key. The confirmation message may further indicate thatthe UE has successfully checked the MAC.

The communication means 1202 may further comprise means for receiving aconfirmation MAC with the confirmation message, and for passing the MACto the key means 2203. The key means 2203 may further comprise means forchecking the confirmation MAC using the direct communication key or akey derived from the direct communication key.

The device may further comprise discovery means 2204 for discovering theUE through a discovery procedure. The communication means 2202 mayfurther comprise means for sending a discovery procedure messagecomprising a discovery message to the UE, wherein the discovery messageincludes the device identifier and is assembled by the discovery means2204. The communication means 2202 may further comprise means forreceiving a discovery procedure message comprising a discovery responsemessage responding to the sent discovery message, and for passing thediscovery response message to the discovery means 2204, the discoveryresponse message including the transaction identifier and the requestfor key generation for direct communication.

The interface may comprise a Proximity services, ProSe, interface, andthe Direct Communication Element may comprise at least one of a ProSeFunction or a ProSe Key Management server, KMS, or ProSe Key ManagementFunction KMF. The invalid transaction identifier may be used as anidentifier of the UE.

The device 2200 may comprise a UE or a UE-to-Network Relay and the keygeneration information may comprise Generic Bootstrapping ArchitecturePush Information, GPI. In some examples, the communication means 2202,key means 2203 and discovery means 2204 may be implemented with helpfrom a computer program which, when run on a processor, causes thecommunication means 2202, key means 2203 and discovery means 2204 tocooperate to carry out examples of the method 200 as described above.

FIG. 23 illustrates functional units in another embodiment of DCE 2300which may execute the method 300 of the present invention, for exampleaccording to computer readable instructions received from a computerprogram. It will be understood that the units illustrated in FIG. 23 aresoftware implemented functional units, and may be realised in anyappropriate combination of software modules.

Referring to FIG. 23, the DCE 2300 comprises communication means 2302for receiving from a device a transaction identifier, a deviceidentifier and a request to provide a direct communication key to thedevice. The DCE 2300 also comprises authorizing means 2303 fordetermining if the transaction identifier is invalid. If the transactionidentifier is invalid, the communication means 2302 further comprisemeans for requesting key generation information and a session shared keyfrom a Bootstrapping Server Function (BSF). The communication means 2302also comprise means for receiving from the BSF the session shared keyand key generation information. The DCE 2300 also comprises key means2304 for deriving a direct communication key from at least the sessionshared key and the device identifier. The communication means 2302further comprises means for sending the direct communication key and thekey generation information to the device.

The DCE 2300 may comprise at least one of a ProSe Function, a ProSe KeyManagement Server or a ProSe Key Management Function. The device maycomprise a UE or UE-to-Network Relay. The key generation information maycomprise Generic Bootstrapping Architecture Push Information, GPI. Thetransaction identifier may be a bootstrapping transaction identifier(B-TID).

The authorizing means may further comprise means for matching thetransaction identifier with a stored transaction identifier from aprevious Generic Bootstrapping Architecture procedure (GBA procedure) soas to identify the UE.

The authorizing means 2304 may further comprise means for mapping thematched transaction identifier to a public UE identifier and thecommunication means 2302 may further comprise means for sending thepublic UE identifier to the BSF.

If the DEC cannot match the transaction identifier with a storedtransaction identifier, DCE identifies the UE by its communication means2302 further comprising means for sending the transaction identifier tothe BSF and receiving the session shared key and the key generationinformation from the BSF. The DCE will receive the session shared keyand the key generation information from the BSF if the BSF hassuccessfully identified the UE using the transaction identifier.

The authorising means 2303 may further comprise means for checking thatat least one of the device or the UE is authorised to establish directcommunication.

The DCE 2303 may comprise a first sub-Element 2300A in a firstcommunication network and a second sub-Element 2300B in a secondcommunication network. The first and second sub elements may eachcomprise communication means 2302, 2305, key means 2304, 2306 andauthorizing means 2303, 2307.

The communication means 2302 or 2305 in one of the first or secondsub-Elements 2300A, 2300B may comprise means for sending to andreceiving from at least one of the BSF or the device by sending to andreceiving from the communication means 2302 or 2303 in the other of thefirst or second sub-Elements 2300A, 2300B.

The authorizing means 2303 in the first sub-Element 2300A may comprisemeans for authorizing a first one of the UE or the device and theauthorizing means 2307 in the second sub-Element 2300B may comprisemeans for authorizing a second one of the UE or the device.

In some examples, the communication means 2302, 2305 key means 2304,2306 and authorizing means 2303, 2307 may be implemented with help froma computer program which, when run on a processor, causes thecommunication means 2302, 2305, key means 2304, 2306 and authorisingmeans 2303, 2307 to cooperate to carry out examples of the method 300 asdescribed above.

FIG. 24 illustrates functional units in another embodiment of UE 2400which may execute the method 100 k, for example according to computerreadable instructions received from a computer program. It will beunderstood that the units illustrated in FIG. 24 are softwareimplemented functional units, and may be realised in any appropriatecombination of software modules.

Referring to FIG. 24, the UE 2400 comprises communication means 2402 forsending to the device a UE identifier comprising any of a ProSe UE ID,international mobile subscriber identity (IMSI), mobile stationinternational subscriber directory number (MSISDN), ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code, ProSe Restricted code,and requesting key generation for direct communication with the device.The communication means 2402 further comprises means for receiving fromthe device a device identifier and key generation information. The UE2400 also comprises key means 2403 for deriving a session shared keyfrom at least the key generation information and for deriving a directcommunication key from at least the session shared key and theidentifier of the device.

The communication means 2402 may further comprise means for sending tothe device direct communication element identifier, direct key setidentifier, DKSI, a list of security algorithms supported by the UE, anda nonce generated by the UE. The communication means 2402 may alsocomprise means for receiving a Message Authentication Code (MAC). Thecommunication means 2402 may further comprise means for receiving theDKSI, a lifetime, at least one security algorithm chosen by the devicefrom the list of security algorithms previously sent, said list ofsecurity algorithms supported by the UE and a nonce generated by thedevice. The communication means 2402 may additionally comprise means forsending a confirmation message to the device indicating that the UE 2400has derived the direct communication key.

The key means 2403 may further comprise means for checking the MACreceived from the device using the derived direct communication key or akey derived from the direct communication key and for generating aconfirmation MAC using the direct communication key or a key derivedfrom the direct communication key. The communication means 2402 mayfurther comprise means for sending the confirmation MAC with theconfirmation message; wherein, if the check is successful, the firstconfirmation message further indicates that the UE has successfullychecked the MAC

The UE 2400 may further comprise discovery means 2404 for discoveringthe device through a discovery procedure. The communication means 2402may comprise means for receiving a discovery procedure messagecomprising a discovery message from the device and for passing themessage to the discovery means 2404, the discovery message including thedevice identifier. The communication means 2402 may also comprise meansfor sending a discovery procedure message comprising a discoveryresponse message responding to the received discovery message, thediscovery response message including the UE identifier and the requestfor key generation for direct communication and being assembled by thediscovery means 2404.

The communication means 2402 may further comprise means for, aspreceding step, requesting key generation for direct communication withthe device and in response receiving from the device a GenericBootstrapping Architecture (GBA) renegotiation request.

Alternatively, the communication means 2402 may further comprise meansfor, as a preceding step, sending a temporary key to the device andreceiving in response a request for a new temporary key, and thensending the UE identifier instead of a new temporary key.

The communication means may further comprise means for, as a precedingstep, for receiving the ProSe UE ID, ProSe Relay UE ID, ProSe DiscoveryUE ID, ProSe Application code or the ProSe restricted code from thedirect communication element.

Additionally, the interface may comprise a proximity Service, ProSeService, interface. Furthermore, the UE may not be able to initiateanother GBA bootstrapping procedure. In one embodiment, the UE does notcomprise a valid shared secret with a Bootstrapping Server Function(BSF).

The device may comprise a UE or a UE-to-Network Relay and the keygeneration information may comprise Generic Bootstrapping ArchitecturePush Information, GPI.

In one example, the communication means 2402, key means 2403 anddiscovery means 2404 may be implemented with help from a computerprogram which, when run on a processor, causes the communication means2402, key means 2403 and discovery means 2404 to cooperate to carry outexamples of the method 100 k as described above.

FIG. 25 illustrates functional units in another embodiment of device2500 which may execute the method 200 k of the present invention, forexample according to computer readable instructions received from acomputer program. It will be understood that the units illustrated inFIG. 25 are software implemented functional units, and may be realisedin any appropriate combination of software modules.

Referring to FIG. 25, the device 2500 comprises communication means 2502for receiving from a UE a UE identifier comprising any of ProSe UE ID,international mobile subscriber identity, IMSI, or mobile stationinternational subscriber directory number, MSISDN, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted code,and a request for key generation for direct communication with thedevice. The communication means 2502 also comprise means for sending toa Direct Communication Element the UE identifier and a deviceidentifier, and for requesting the Direct Communication Element toprovide the device with a direct communication key. The communicationmeans 2502 also comprise means for receiving from the DirectCommunication Element the direct communication key and key generationinformation, and for sending the key generation information and thedevice identifier to the UE. The device may also comprise key means 2503for storing the direct communication key.

The communication means 2502 may further comprise means for receivingfrom the UE a direct communication element identifier, a direct key setidentifier, DKSI, a list of security algorithms supported by the UE anda nonce generated by the UE. The communication means 2502 mayadditionally comprise means for sending DKSI, a lifetime, at least onesecurity algorithm chosen from the list of security algorithms supportedby the UE, said list of security algorithms supported by the UE and anonce generated by the device.

The key means 2503 may further comprise means for generating a MessageAuthentication Code, MAC, using the direct communication key or a keyderived from the direct communication key and the communication means2502 may further comprise means for sending the MAC to the UE with thekey generation information and the device identifier. The communicationmeans 2502 may further comprise means for receiving a confirmationmessage from the UE indicating that the UE has derived the directcommunication key. The confirmation message may further indicate thatthe UE has successfully checked the MAC.

The communication means 2502 may further comprise means for receiving aconfirmation MAC with the confirmation message, and for passing the MACto the key means 2503. The key means 2503 may further comprise means forchecking the confirmation MAC using the direct communication key or akey derived from the direct communication key.

The device may further comprise discovery means 2504 for discovering theUE through a discovery procedure. The communication means 2502 mayfurther comprise means for sending a discovery procedure messagecomprising a discovery message to the UE, wherein the discovery messageincludes the device identifier and is assembled by the discovery means2204. The communication means 2202 may further comprise means forreceiving a discovery procedure message comprising a discovery responsemessage responding to the sent discovery message, and for passing thediscovery response message to the discovery means 2204, the discoveryresponse message including the UE identifier and the request for keygeneration for direct communication.

The interface may comprise a Proximity services, ProSe, interface, andthe Direct Communication Element may comprise at least one of a ProSeFunction or a ProSe Key Management server, KMS, or ProSe Key ManagementFunction KMF. The UE identifier may be used as an identifier of the UE.

The device 2500 may comprise a UE or a UE-to-Network Relay and the keygeneration information may comprise Generic Bootstrapping ArchitecturePush Information, GPI.

In some examples, the communication means 2502, key means 2503 anddiscovery means 2504 may be implemented with help from a computerprogram which, when run on a processor, causes the communication means2502, key means 2503 and discovery means 2504 to cooperate to carry outexamples of the method 200 k as described above.

FIG. 26 illustrates functional units in another embodiment of DCE 2600which may execute the method 300 k of the present invention, for exampleaccording to computer readable instructions received from a computerprogram. It will be understood that the units illustrated in FIG. 26 aresoftware implemented functional units, and may be realised in anyappropriate combination of software modules.

Referring to FIG. 26, the DCE 2600 comprises communication means 2602for receiving from a device a UE identifier comprising any of ProSe UEID, international mobile subscriber identity, IMSI, or mobile stationinternational subscriber directory number, MSISDN, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted code,a device identifier and a request to provide a direct communication keyto the device. The DCE 2600 also comprises authorizing means 2603 foridentifying the UE using the UE identifier. The communication means 2602further comprise means for requesting key generation information and asession shared key from a Bootstrapping Server Function (BSF). Thecommunication means 2602 also comprise means for receiving from the BSFthe session shared key and key generation information. The DCE 2600 alsocomprises key means 2604 for deriving a direct communication key from atleast the session shared key and the device identifier. Thecommunication means 2602 further comprises means for sending the directcommunication key and the key generation information to the device.

The DCE 2600 may comprise at least one of a ProSe Function, a ProSe KeyManagement Server or a ProSe Key Management Function. The device maycomprise a UE or UE-to-Network Relay. The key generation information maycomprise Generic Bootstrapping Architecture Push Information, GPI.

The authorizing means 2603 may further comprise means for matching theUE identifier with a UE identifier stored with the DCE. Alternatively,the authorizing means 2603 may pass to the communication means 2602instructions to send to a server to identify the UE, wherein the servermay be a home subscriber server, HSS.

The authorizing means 2604 may further comprise means for mapping theidentified UE to a public UE identifier and the communication means 2602may further comprise means for sending the public UE identifier to theBSF.

The authorising means 2603 may further comprise means for checking thatat least one of the device or the UE is authorised to establish directcommunication.

The DCE 2603 may comprise a first sub-Element 2600A in a firstcommunication network and a second sub-Element 2600B in a secondcommunication network. The first and second sub elements may eachcomprise communication means 2602, 2605, key means 2604, 2606 andauthorizing means 2603, 2607.

The communication means 2602 or 2605 in one of the first or secondsub-Elements 2600A, 2600B may comprise means for sending to andreceiving from at least one of the BSF or the device by sending to andreceiving from the communication means 2602 or 2603 in the other of thefirst or second sub-Elements 2600A, 2600B.

The authorizing means 2603 in the first sub-Element 2600A may comprisemeans for authorizing a first one of the UE or the device and theauthorizing means 2607 in the second sub-Element 2600B may comprisemeans for authorizing a second one of the UE or the device.

In some examples, the communication means 2602, 2605 key means 2604,2606 and authorizing means 2603, 2607 may be implemented with help froma computer program which, when run on a processor, causes thecommunication means 2602, 2605, key means 2604, 2606 and authorisingmeans 2603, 2607 to cooperate to carry out examples of the method 300 kas described above.

Aspects of the present invention thus provide methods, apparatus,computer programs and systems enabling the establishment of a key fordirect communication between a UE and a device. The key is establishedusing GBA Push procedures and aspects of the present invention enable ashared key to be established between a UE and another device without theneed for pre-configuring in the UE or device and without the need fornetwork coverage for the UE.

Aspects of the present invention thus provide methods, apparatus,computer programs and systems enabling the establishment of a key fordirect communication between a UE and a device. The key is establishedusing GBA Push procedures and aspects of the present invention enable ashared key to be established between a UE and another device without theneed for pre-configuring in the UE or device and without the need fornetwork coverage for the UE.

The above methods, apparatus, computer programs and system provide theadvantage of employing GBA Push when there is no valid shared secret andGBA push is unavailable. Using GBA Push reduces the number of messagessent and so less load on the network.

Advantageously, some of the embodiments reuse an invalid transactionidentifier and other embodiments use UE identifiers such as ProSe UE ID,international mobile subscriber identity, IMSI, mobile stationinternational subscriber directory number, MSISDN, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted code,where at least ProSe UE ID, ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code and ProSe Restricted code are temporary UEidentifiers.

The methods of the present invention may be implemented in hardware, oras software modules running on one or more processors. The methods mayalso be carried out according to the instructions of a computer program,and the present invention also provides a computer readable mediumhaving stored thereon a program for carrying out any of the methodsdescribed herein. A computer program embodying the invention may bestored on a computer-readable medium, or it could, for example, be inthe form of a signal such as a downloadable data signal provided from anInternet website, or it could be in any other form.

It should be noted that the above-mentioned embodiments illustraterather than limit the invention, and that those skilled in the art willbe able to design many alternative embodiments without departing fromthe scope of the appended claims. The word “comprising” does not excludethe presence of elements or steps other than those listed in a claim,“a” or “an” does not exclude a plurality, and a single processor orother unit may fulfil the functions of several units recited in theclaims. Any reference signs in the claims shall not be construed so asto limit their scope.

The invention claimed is:
 1. A method, performed by a User Equipmentdevice (UE) for obtaining a key for direct communication with a deviceover an air interface, the method comprising: sending a temporary key tothe device; receiving a request for a new temporary key; instead ofsending the new temporary key, sending to the device a UE identifiercomprising any of Proximity Services (ProSe) UE ID, international mobilesubscriber identity (IMSI), mobile station international subscriberdirectory number (MSISDN), ProSe Relay UE ID, ProSe Discovery UE ID,ProSe Application code or ProSe Restricted code and requesting keygeneration for direct communication with the device; receiving from thedevice a device identifier and key generation information, deriving asession shared key from at least the key generation information, andderiving a direct communication key from at least the session key andthe device identifier; and using the direct communication key toestablish direct communication with the device over the air interface.2. A method as claimed in claim 1, wherein the interface comprises aProSe interface.
 3. A method as claimed in claim 1, further comprisingdiscovering the device through a discovery procedure.
 4. A method asclaimed in claim 1, wherein the UE further sends to the device, a directcommunication element identifier, direct key set identifiers (DKSI), alist of security algorithms supported by the UE, and a nonce generatedby the UE.
 5. A method as claimed in claim 4, further comprisingreceiving a Message Authentication Code (MAC), with the deviceidentifier and key generation information, wherein the MAC is generatedusing the direct communication key or a key derived from the directcommunication key.
 6. A method as claimed in claim 5, further comprisingreceiving the DKSI, a lifetime, at least one security algorithm chosenby the device from the list of security algorithms, said list ofsecurity algorithms supported by the UE, together with the MAC, deviceidentifier and key generation information.
 7. A method according toclaim 1, further comprising: prior to receiving key generationinformation, requesting key generation for direct communication with thedevice, and in response to request key generation, receiving from thedevice a Generic Bootstrapping Architecture (GBA) renegotiation request.8. A method as claimed in claim 1, wherein the UE cannot initiate aGeneric bootstrapping architecture (GBA) procedure.
 9. A method asclaimed in claim 1, wherein the UE does not comprise a valid sharedsecret with a Bootstrapping Server Function (BSF).
 10. A methodaccording to claim 1, further comprising prior to sending the UEidentifier to the device, receiving the ProSe UE ID, ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codefrom a Direct Communication element.
 11. A method as claimed in claim 1,wherein the device comprises at least one of: a UE; a UE-to-NetworkRelay.
 12. A method as claimed in claim 1, wherein the key generationinformation comprises Generic Bootstrapping Architecture PushInformation (GPI).
 13. The method as claimed in claim 1, wherein bysending the UE identifier to the device, the UE, which may not havepreviously run a Generic Bootstrapping Architecture procedure with aDirect Communication Element operating as Network Application Function(NAF), is able to establish direct communication with the device via adevice communicating with the NAF.
 14. A method, performed by a device,for obtaining a key for direct communication with a User Equipmentdevice (UE) over an air interface, the method comprising: receiving atemporary key from the UE; sending a request for a new temporary key;instead of receiving the new temporary key, receiving from the UE a UEidentifier comprising any of Proximity Services (ProSe) UE ID,international mobile subscriber identity (IMSI), mobile stationinternational subscriber directory number (MSISDN), ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codeand a request to obtain a direct communication key; sending to a DirectCommunication Element the UE identifier and a device identifier of thedevice, and requesting the Direct Communication Element to provide thedevice with the direct communication key; and receiving the directcommunication key and key generation information from the DirectCommunication Element; and sending the key generation information andthe device identifier to the UE to cause the UE to derive the directcommunication key and establish direct communication with the deviceover the air interface.
 15. A method as claimed in claim 14, wherein theinterface comprises a ProSe interface, and the Direct CommunicationElement comprises at least one of a ProSe Function, a ProSe KeyManagement Server, and a ProSe Key Management Function.
 16. A method asclaimed in claim 14, further comprising receiving a direct communicationelement identifier, a direct key set identifier, a list of securityalgorithms supported by the UE and a nonce generated by the UE.
 17. Amethod as claimed in claim 16, further comprising sending to the UE adirect key set identifier (DKSI), a lifetime, at least one securityalgorithm chosen by the device from the list of security algorithmssupported by the UE, said list of algorithms supported by the UE, and anonce generated by the device.
 18. A method, performed by a DirectCommunication Element, for establishing a key for direct communicationover an interface between a User Equipment device (UE), and a device,the method comprising: receiving from the device a UE identifiercomprising any of Proximity Services (ProSe) UE ID, international mobilesubscriber identity, IMSI (IMSI), mobile station internationalsubscriber directory number (MSISDN), ProSe Relay UE ID, ProSe DiscoveryUE ID, ProSe Application code or ProSe Restricted code, a deviceidentifier, and a request to provide a direct communication key to thedevice; identifying the UE from the UE identifier, mapping theidentified UE to a public UE identifier, sending a request to abootstrapping server function, BSF, for key generation information and asession shared key, the request comprising the public UE identifier,receiving from the BSF said key generation information and sessionshared key, deriving the direct communication key from at least thesession shared key and the device identifier, and sending the directcommunication key and the key generation information to the device tocause the device to forward the direct communication key or the keygeneration information to the UE which establishes direct communicationbetween the device and the UE over the interface.
 19. A method asclaimed in claim 18, wherein the interface comprises a ProSe interface,and the Direct Communication Element comprises at least one of a ProSeFunction, a ProSe Key Management Function or a ProSe Key ManagementServer.
 20. A method as claimed in claim 18, further comprising: priorto receiving the UE identifier from the device, generating the ProSe UEID, the ProSe Relay UE ID, the ProSe Discovery UE ID, the ProSeApplication code or the ProSe Restricted codes; and providing the ProSeUE ID, the ProSe Relay UE ID, the ProSe Discovery UE ID, the ProSeApplication code or the ProSe Restricted code to the UE.
 21. A systemfor securing direct communication between a User Equipment device (UE),and a device over an interface, the system comprising the UE, the deviceand a Direct Communication Element; wherein the UE is operable to send aUE identifier comprising any of Proximity Services (ProSe) UE ID,international mobile subscriber identity (IMSI), mobile stationinternational subscriber directory number (MSISDN), ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted code,to the direct communication element via the device, and the directcommunication element is operable to identify the UE using the UEidentifier, map the identified UE to a public UE identifier, send arequest comprising the public UE identifier to a bootstrapping serverfunction, BSF, for key generation information and a session shared key,obtain the session shared key and Generic Bootstrapping ArchitecturePush Information (GPI), derive a direct communication key from at leastthe session shared key, and send the direct communication key and theGPI to the device, wherein the device is operable to send the GPI to theUE, and wherein the UE is operable to derive the session shared key fromat least the GPI and derive the direct communication key from thesession shared key and use the direct communication key to establishdirect communication with the device over the interface.
 22. A Userequipment device (UE), for obtaining a key for direct communication witha device over an interface, the UE comprising a processor and a memory,said memory containing instructions that when executed cause the UE to:send a temporary key to the device; receive a request for a newtemporary key; instead of sending the new temporary key, send to thedevice a UE identifier comprising any of Proximity Services (ProSe) UEID, international mobile subscriber identity, IMSI, mobile stationinternational subscriber directory number (MSISDN), ProSe Relay UE ID,ProSe Discovery UE ID, ProSe Application code or ProSe Restricted codeand request key generation for direct communication with the device;receive from the device a device identifier and key generationinformation, derive a session shared key from at least the keygeneration information, derive a direct communication key from at leastthe session key and the device identifier; and use the directcommunication key to establish direct communication with the device overthe interface.
 23. A device configured for obtaining a key for directcommunication with a User Equipment (UE) over an interface, the devicecomprising a processor and a memory, said memory containing instructionsthat when executed cause the device to receive a temporary key from theUE; send a request for a new temporary key; instead of receiving the newtemporary key, receive from the UE a UE identifier comprising any ofProximity Services (ProSe) UE ID, international mobile subscriberidentity (IMSI), mobile station international subscriber directorynumber (MSISDN), ProSe Relay UE ID, ProSe Discovery UE ID, ProSeApplication code or ProSe Restricted code and a request to obtain adirect communication key; send to a Direct Communication Element the UEidentifier and a device identifier of the device, and requesting theDirect Communication Element to provide the device with the directcommunication key; and receive the direct communication key and keygeneration information from the Direct Communication Element; and sendthe key generation information and the device identifier to the UE tothe UE to derive the direct communication key and establish directcommunication with the device over the interface.
 24. A non-transitorycomputer readable storage medium storing a computer program which whenexecuted by a User Equipment device (UE) causes the UE to carry out amethod comprising: sending a temporary key to a device; receiving arequest for a new temporary key; instead of sending the new temporarykey, sending to the device a UE identifier comprising any of ProximityServices (ProSe) UE ID, international mobile subscriber identity (IMSI),mobile station international subscriber directory number (MSISDN), ProSeRelay UE ID, ProSe Discovery UE ID, ProSe Application code or ProSeRestricted code and requesting key generation for direct communicationwith the device; receiving from the device a device identifier and keygeneration information, deriving a session shared key from at least thekey generation information, and deriving a direct communication key fromat least the session key and the device identifier; and using the directcommunication key to establish direct communication with the device overan air interface.